wilgory / apple-http-osmf

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

Error in Bip-bop example: Quality level cannot be set at this time. #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build unmodified AppleStreamingInOSMF.mxml example
2. Run in debug player

What is the expected output?
Video and audio should play.

What do you see instead?
Exception is thrown before playback begins (see full trace output below)
After dismissing the exception, playback begins, but is audio only.

What version of the product are you using? On what operating system?
Using OSMF 2.0 release built from source.
Flex 4.6, with Flash Builder 4.6
Mac OS X Lion 10.7.4
Firefox 14

Please provide any additional information below.

Full log output and stack trace:
Fri Jun 22 2012 02:31:10 AM.387 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] State = init
Fri Jun 22 2012 02:31:10 AM.392 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamSource] State = init
Fri Jun 22 2012 02:31:10 AM.392 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamSource] Provider initialized.
Fri Jun 22 2012 02:31:10 AM.397 [DEBUG] 
[org.osmf.elements.LightweightVideoElement] No DRM Contenta data available 
upfront. Play the content and listen for any DRM-related events.
Fri Jun 22 2012 02:31:10 AM.406 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] Play initiated for 
[http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8] with 
parameters ( start = 0, duration = -1 ).
Fri Jun 22 2012 02:31:10 AM.407 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamSource] Opening stream [ /bipbopall.m3u8 
]. 
Fri Jun 22 2012 02:31:10 AM.410 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading (timeout=4000, 
retry=0):http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
Fri Jun 22 2012 02:31:10 AM.410 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] State = seek
Fri Jun 22 2012 02:31:10 AM.414 [DEBUG] [org.osmf.layout.LayoutRendererBase] ON 
EXIT FRAME: BEGIN
Fri Jun 22 2012 02:31:10 AM.414 [DEBUG] [org.osmf.layout.LayoutRendererBase] 
VALIDATING LAYOUT
Fri Jun 22 2012 02:31:10 AM.416 [INFO] 
[org.osmf.media.videoClasses.VideoSurface] switchRenderer. currentVideoRenderer 
= null; the new renderer = [object StageVideo]
Fri Jun 22 2012 02:31:10 AM.425 [DEBUG] [org.osmf.layout.LayoutRendererBase] 
LAYOUT VALIDATED
Fri Jun 22 2012 02:31:10 AM.425 [DEBUG] [org.osmf.layout.LayoutRendererBase] ON 
EXIT FRAME: END
Fri Jun 22 2012 02:31:10 AM.442 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loaded 292 bytes from 292 
bytes.
Fri Jun 22 2012 02:31:10 AM.442 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading complete. It took 0 
sec and 0 retries to download 292 bytes.
Fri Jun 22 2012 02:31:10 AM.444 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] Download complete: 
http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 (292 bytes)
Fri Jun 22 2012 02:31:10 AM.447 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Closing 
:http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
Fri Jun 22 2012 02:31:10 AM.448 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading (timeout=4000, 
retry=0):http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8
Fri Jun 22 2012 02:31:10 AM.465 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loaded 7019 bytes from 7019 
bytes.
Fri Jun 22 2012 02:31:10 AM.466 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading complete. It took 
0.001 sec and 0 retries to download 7019 bytes.
Fri Jun 22 2012 02:31:10 AM.466 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] Download complete: 
http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8 (7019 
bytes)
Fri Jun 22 2012 02:31:10 AM.470 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] onScriptData called with mode 
[immediate].
Fri Jun 22 2012 02:31:10 AM.470 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] onMetaData invoked.
Fri Jun 22 2012 02:31:10 AM.473 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Closing 
:http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8
Fri Jun 22 2012 02:31:10 AM.473 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading (timeout=4000, 
retry=0):http://devimages.apple.com/iphone/samples/bipbop/gear2/prog_index.m3u8
Fri Jun 22 2012 02:31:10 AM.481 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loaded 7019 bytes from 7019 
bytes.
Fri Jun 22 2012 02:31:10 AM.481 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading complete. It took 0 
sec and 0 retries to download 7019 bytes.
Fri Jun 22 2012 02:31:10 AM.481 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] Download complete: 
http://devimages.apple.com/iphone/samples/bipbop/gear2/prog_index.m3u8 (7019 
bytes)
Fri Jun 22 2012 02:31:10 AM.483 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] onScriptData called with mode 
[immediate].
Fri Jun 22 2012 02:31:10 AM.483 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] onMetaData invoked.
Fri Jun 22 2012 02:31:10 AM.483 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Closing 
:http://devimages.apple.com/iphone/samples/bipbop/gear2/prog_index.m3u8
Fri Jun 22 2012 02:31:10 AM.483 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading (timeout=4000, 
retry=0):http://devimages.apple.com/iphone/samples/bipbop/gear3/prog_index.m3u8
Fri Jun 22 2012 02:31:10 AM.502 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loaded 7019 bytes from 7019 
bytes.
Fri Jun 22 2012 02:31:10 AM.502 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading complete. It took 0 
sec and 0 retries to download 7019 bytes.
Fri Jun 22 2012 02:31:10 AM.502 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] Download complete: 
http://devimages.apple.com/iphone/samples/bipbop/gear3/prog_index.m3u8 (7019 
bytes)
Fri Jun 22 2012 02:31:10 AM.504 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] onScriptData called with mode 
[immediate].
Fri Jun 22 2012 02:31:10 AM.504 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] onMetaData invoked.
Fri Jun 22 2012 02:31:10 AM.504 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Closing 
:http://devimages.apple.com/iphone/samples/bipbop/gear3/prog_index.m3u8
Fri Jun 22 2012 02:31:10 AM.504 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading (timeout=4000, 
retry=0):http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8
Fri Jun 22 2012 02:31:10 AM.525 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loaded 7019 bytes from 7019 
bytes.
Fri Jun 22 2012 02:31:10 AM.525 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamDownloader] Loading complete. It took 0 
sec and 0 retries to download 7019 bytes.
Fri Jun 22 2012 02:31:10 AM.525 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] Download complete: 
http://devimages.apple.com/iphone/samples/bipbop/gear4/prog_index.m3u8 (7019 
bytes)
Fri Jun 22 2012 02:31:10 AM.526 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] onScriptData called with mode 
[immediate].
Fri Jun 22 2012 02:31:10 AM.527 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPNetStream] onMetaData invoked.
Fri Jun 22 2012 02:31:10 AM.528 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamSource] Stream [ /bipbopall.m3u8 ] 
refreshed. ( offset = 0, live = false).
Fri Jun 22 2012 02:31:10 AM.528 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamSource] Stream name [ /bipbopall.m3u8 ] 
and quality level [0] are not in sync.
Fri Jun 22 2012 02:31:10 AM.529 [DEBUG] 
[org.osmf.net.httpstreaming.HTTPStreamSource] Prepare to switch the quality 
level to http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
Error: Quality level cannot be set at this time.
    at org.osmf.net.httpstreaming::HTTPStreamSource/changeQualityLevel()[/Users/theturtle32/Downloads/OSMF/framework/OSMF/org/osmf/net/httpstreaming/HTTPStreamSource.as:330]
    at org.osmf.net.httpstreaming::HTTPStreamSource/onIndexReady()[/Users/theturtle32/Downloads/OSMF/framework/OSMF/org/osmf/net/httpstreaming/HTTPStreamSource.as:679]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at at.matthew.httpstreaming::HTTPStreamingM3U8IndexHandler/processIndexData()[/Users/theturtle32/work/snapcuts/osmf-hls-player/src/at/matthew/httpstreaming/HTTPStreamingM3U8IndexHandler.as:212]
    at org.osmf.net.httpstreaming::HTTPStreamSource/onIndexComplete()[/Users/theturtle32/Downloads/OSMF/framework/OSMF/org/osmf/net/httpstreaming/HTTPStreamSource.as:735]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at org.osmf.net.httpstreaming::HTTPStreamDownloader/onComplete()[/Users/theturtle32/Downloads/OSMF/framework/OSMF/org/osmf/net/httpstreaming/HTTPStreamDownloader.as:405]

Original issue reported on code.google.com by theturtl...@gmail.com on 22 Jun 2012 at 9:37

GoogleCodeExporter commented 8 years ago
Just tried it with the pre-built osmf.swc file from the 2.0 release with the 
same results.

Original comment by theturtl...@gmail.com on 22 Jun 2012 at 9:59

GoogleCodeExporter commented 8 years ago
Hi the example isn't working for me at all, im using a pure as3 prototype 
loading the files directly. There is problems still, the mbr stream needs to be 
referenced to play instead of the master file. Also an event needed to be 
switched around here is a diff. 

Original comment by dani...@electroteque.org on 22 Jun 2012 at 1:04

Attachments:

GoogleCodeExporter commented 8 years ago
The complete direct example

netResource = new StreamingURLResource(filename);

var httpNetStream:HTTPNetStream = new HTTPNetStream(connection, new 
HTTPStreamingM3U8Factory(), netResource);
httpNetStream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
video.attachNetStream(httpNetStream);
httpNetStream.client = this;

httpNetStream.play("http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_
index.m3u8");

I think the playlist parsing has to be done externally as with f4m so it 
generates a UrlResource object out of it with the mbr information in that. Its 
currently done internally and no possible way to get access to that 
information. 

Original comment by dani...@electroteque.org on 22 Jun 2012 at 1:06

GoogleCodeExporter commented 8 years ago
run the diff and point directly to a bitrate, the mbr list is generated 
internally not externally at the moment therefore not useful with dynamic 
switch streaming etc

"http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8"

Original comment by dani...@electroteque.org on 22 Jun 2012 at 1:59

GoogleCodeExporter commented 8 years ago
I just realised osmf 2.0 is broken if your compiler is set to strict mode

inside HTTPStreamingEvent

set the constructor arg to this, the constant doesnt work ???? 

reason:String =  "normal",

Original comment by dani...@electroteque.org on 22 Jun 2012 at 2:47

GoogleCodeExporter commented 8 years ago
There is now a cross domain issue that needs to be resolved. 

Original comment by dani...@electroteque.org on 22 Jun 2012 at 3:08

GoogleCodeExporter commented 8 years ago
ok, I need to find a demo online with a crossdomain policy on its domain thats 
open :)

Original comment by dani...@electroteque.org on 22 Jun 2012 at 3:22

GoogleCodeExporter commented 8 years ago
Have a look here, i used the wowza demo as they have a crossdomain policy ! . 
This is directly integrated as a streaming plugin into flowplayer.

http://flowplayer.electroteque.org/httpstreaminghls

I guess mbr will come once the parser is fixed up and then attach it to dynamic 
switch streaming. 

Original comment by dani...@electroteque.org on 22 Jun 2012 at 3:40

GoogleCodeExporter commented 8 years ago
Daniel, your patch fixes the "Quality level cannot be set at this time" 
exception, thank you!  I'm still not getting any video playback.  Looking at 
your AS3 playback example, I'm not sure where you got the HTTPNetStream class?  
It's not provided by either Flex 4.6 or OSMF 2.0?

Original comment by theturtl...@gmail.com on 23 Jun 2012 at 8:52

GoogleCodeExporter commented 8 years ago
hi its in org/osmf/net/httpstreaming

Original comment by dani...@electroteque.org on 11 Jul 2012 at 4:44

GoogleCodeExporter commented 8 years ago
Hi is it possible to checkout this diff if possible to make the sources work ? 

Original comment by dani...@electroteque.org on 17 Jul 2012 at 12:44

GoogleCodeExporter commented 8 years ago
Hi is it possible to check in that patch to make this code actually work ? Im 
currently looking at externalising the parser so it can generate an mbr 
resource properly exactly like how httpsreaming is working, this makes it 
possibly to actually obtain the bitrates model correctly. 

Original comment by dani...@electroteque.org on 27 Sep 2012 at 5:13

GoogleCodeExporter commented 8 years ago
http://code.google.com/p/apple-http-osmf/issues/detail?id=23 

i updated the patch here however, there is still a problem with MBR streams 
because you have to specifically tell to play one of the streams because the 
top level feed is the stream name, no levels match therefore will throw this 
error still and fail playback. 

Original comment by dani...@electroteque.org on 4 Oct 2012 at 2:58

GoogleCodeExporter commented 8 years ago
Hi all problems are fixed here, the patch is redundant now as I refactored 
quite a bit of stuff. 

http://code.google.com/p/apple-http-osmf/issues/detail?id=24

A mbr feed can be configured and it will parse correctly. Ive tested stream 
switching and works perfectly. 

Original comment by electrot...@gmail.com on 5 Nov 2012 at 10:44

GoogleCodeExporter commented 8 years ago
note, the problem with the audio playing while the video is nowhere to be found 
is unrelated to the exception, it's because of osmf 2.0.

to fix the example, put this line in the onApplicationComplete() handler:

OSMFSettings.enableStageVideo = false;

Original comment by jon.mars...@englishcentral.com on 9 May 2013 at 8:52