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!
Printable View
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!
Using:
will trace all the metadata, including cue points. So if there are none, it will not show any.Code:ns.onMetaData = function(myMeta) {
for (var i in myMeta) {
trace(i + ":\t" + myMeta[i])
}
}
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
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;
}
}
Thanks for the update!
VM