yyibetter / apple-http-osmf

Automatically exported from code.google.com/p/apple-http-osmf
0 stars 0 forks source link

seek does not work for mediaPlayer #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. mediaPlayer.seek(3);

What is the expected output? What do you see instead?
- Should jump to the corresponding ts file and load.
- Instead I see:
Error: The specified capability is not currently supported

What version of the product are you using? On what operating system?
OSMF 1.5, Windows XP

Please provide any additional information below.

Original issue reported on code.google.com by kpda...@gmail.com on 3 Aug 2011 at 12:07

GoogleCodeExporter commented 9 years ago
See the patch I posted on issue number 2. To get seek to work you have to 
properly notify the duration.  There is still an issue seeking with live 
streams I am working on as well as properly updating the currentTime for the 
media player when starting a live stream.  

Original comment by dakazm...@gmail.com on 5 Aug 2011 at 3:41

GoogleCodeExporter commented 9 years ago
I just committed the patch for both duration and live streaming.  please 
re-check out the code now and see if live streaming works for you.

Here are is my seekbar in the application.mxml:

<code>
<mx:HSlider id="seekBar" width="100%" change="onSeek(seekBar.value)"/>
...
            private function onSeek(loc:Number):void {    
                    mediaPlayer.seek(loc);
            }
          private function onDurationChange(event:TimeEvent):void {
                if(mediaPlayer.duration <= 0) { // its a live stream
                    seekBar.visible = false;
                } else {
                    seekBar.maximum = event.time;
                }
            }
</code>

Original comment by dakazm...@gmail.com on 11 Aug 2011 at 10:01