I'm trying to test out error-handling code, and my first test was to set a bad URL (404).
onError was called with "Error #2032".
Is there any list of message values? I'd like, if possible, to handle the error differently depending on the cause of error, so knowing why there was an error would help.
Is this format a safe assumption: bc.. var result = /^Error #(\d+)$/.exec(message) if (result) { if (result == "2032") { } else if (result = "<some other number>") { ... } }
the *onError* event seems to be working on this Test Page:bc.. http://willswonders.myip.org:8088/HTML5/JW Player HTML5-Beta3-01.html
JW player v5.3.1397
the second track is purposely broken, so when you select the second track, you should see:bc.. Position updated: 7.36 Stopped Playlist Item: 1 Buffering Stopped Error: Error #2032 as well as an "Error #2032" in the video displayarea...
Hey noone, thanks for checking out my issue. In Firefox, IE and Chrome all three playlist items on that page play for me. So I can't test the error you set up. Maybe it's on a different page?
the second track is broken (missing the "h" before "ttp://...")...
if you select the second track, "Error #2032" will show in the displayarea and in the textarea...
bc.. <?xml version="1.0" encoding="UTF-8"?> <playlist xmlns="http://xspf.org/ns/0/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats" version="1"> <title>Example XSPF playlist for the JW Player</title> <info>http://www.longtailvideo.com</info> <trackList> <track> <creator>The Peach Open Movie Project</creator> <title>1: Big Buck Bunny - FLV Video</title> <info>http://www.bigbuckbunny.org/</info> <annotation>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</annotation> <location>http://www.longtailvideo.com/jw/upload/bunny.flv</location> <image>http://www.longtailvideo.com/jw/upload/bunny.jpg</image> <jwplayer:newsticker.link>http://www.google.com/</jwplayer:newsticker.link> <jwplayer:newsticker.text>THIS IS THE 1st VIDEO</jwplayer:newsticker.text> <jwplayer:captions.file>captionsaaa.xml</jwplayer:captions.file> </track> <track> <creator>The Peach Open Movie Project</creator> <title>2: Big Buck Bunny - MP3 Audio with thumbnail image</title> <info>http://www.bigbuckbunny.org/</info> <annotation>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</annotation> *<location>ttp://www.longtailvideo.com/jw/upload/bunny.mp3</location>* <image>http://www.longtailvideo.com/jw/upload/bunny.jpg</image> <jwplayer:newsticker.link>http://www.aol.com/</jwplayer:newsticker.link> <jwplayer:newsticker.text>THIS IS THE 2nd VIDEO</jwplayer:newsticker.text> <jwplayer:captions.file>captionsbbb.xml</jwplayer:captions.file> </track> <track> <creator>The Peach Open Movie Project</creator> <title>3: Big Buck Bunny - PNG Image with start</title> <info>http://www.bigbuckbunny.org/</info> <annotation>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</annotation> <location>http://www.longtailvideo.com/jw/upload/bunny.png</location> <image>http://www.longtailvideo.com/jw/upload/bunny.jpg</image> <meta rel="duration">20</meta> <meta rel="start">10</meta> <jwplayer:newsticker.link>http://www.yahoo.com/</jwplayer:newsticker.link> <jwplayer:newsticker.text>THIS IS THE 3rd VIDEO</jwplayer:newsticker.text> <jwplayer:captions.file>captionsccc.xml</jwplayer:captions.file> </track> <track> <creator>The Peach Open Movie Project</creator> <title>4: Big Buck Bunny - PNG Image with start</title> <info>http://www.bigbuckbunny.org/</info> <annotation>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</annotation> <location>http://www.longtailvideo.com/jw/upload/bunny.png</location> <image>http://www.longtailvideo.com/jw/upload/bunny.jpg</image> <meta rel="duration">20</meta> <meta rel="start">10</meta> <jwplayer:newsticker.link>http://www.yahoo.com/</jwplayer:newsticker.link> <jwplayer:newsticker.text>THIS IS THE 4th VIDEO</jwplayer:newsticker.text> <jwplayer:captions.file>captionsddd.xml</jwplayer:captions.file> </track> </trackList> </playlist>
Sorry, I was looking at the links below the player, not the built-in playlist.
Yes, your test works for me.
I see that you are using a player with a micro version of 1397. I need to use a licensed/released version and so I believe I'm stuck with 5.3.1356. Maybe this is a question now for Ethan or someone. Do I need to wait for version 5.4 to get a licensed/released version of the player with changes such as these incorporated?