-
onMetaData - check for NO cuepoints
Hi there, using NetStream in AS3.
With the metadata Object - how can I check to see if there are NO cue points in the video?
Using something like info.cuePoints.length in the condition of an if statement doesn't work...
Any ideas?
Thanks!
[swf width="300" height="40" background="#000000"]http://www.zizunetwork.com/zizunetworkcouk.swf[/swf]
-
Using:
Code:
ns.onMetaData = function(myMeta) {
for (var i in myMeta) {
trace(i + ":\t" + myMeta[i])
}
}
will trace all the metadata, including cue points. So if there are none, it will not show any.
Test on video with cuepoints first and then video without to verify that it will work for you.
Video Man
-
Hi there - thanks for the reply - I understand how that works and how to identify if cue points exist in a trace, however I'm interested to set a variable, say:
hasCuePoints (Boolean)
depending on whether or not the metadata identifies any cue points.
How do I do this?
Thanks
[swf width="300" height="40" background="#000000"]http://www.zizunetwork.com/zizunetworkcouk.swf[/swf]
-
I ended up using this to solve my problem
PHP Code:
function onMetaData(info:Object):void { if (info.cuePoints == undefined){ _haveCuePoints = false; } else { _haveCuePoints = true; } }
[swf width="300" height="40" background="#000000"]http://www.zizunetwork.com/zizunetworkcouk.swf[/swf]
-
Thanks for the update!
VM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|