2

I am running into an issue with the MediaElement.js media player, where filenames containing whitespace (e.g., "File 1.mp4") cannot be played using the RTMP protocol. This issue only appears to happen when using the media player in Firefox. I am currently testing the MediaElement.js 2.12.0 player with Firefox 21. However, if I play the same video in Internet Explorer, the video is retrieved and streamed successfully using the same URL. A sample URL may be in the format:

rtmp://host/video/definst/mp4:/path/File 1.mp4

I tried URL encoding the filename when passing the URL to the Media Player. However, the file will then not play in either Firefox or IE.

If I attempt to play the video with a space using the HTTP protocol, then both Firefox and IE can play the video:

http: //host/video/path/File 1.mp4

Can this issue be resolved? Thanks!

2 Answers2

0

Try replacing the space with a + sign or %20

Banning
  • 2,279
  • 2
  • 16
  • 20
  • I have replaced the space with a %20 and a + in the URL. However, the file will still not play in the media player. Has anyone else experienced this issue? – user2567054 Jul 16 '13 at 22:24
  • Do you have this online anywhere were I could see it not working to help you debug it? – Banning Jul 17 '13 at 13:04
  • I don't currently have the media player on a public site. The easiest way to test it is just to attempt to stream any video file containing a space in it. To enable the RTMP stream, I used Adobe Media Server. You can use the development version without a license for limited connections. – user2567054 Jul 17 '13 at 17:21
0

It looks like its because Firefox doesn't support MP4 ... BUT it looks like the script support multiple fallback codecs... http://mediaelementjs.com/#installation - "This includes multiple codecs for various browsers (h.264 for IE9, Safari, and mobile browsers; WebM for Firefox 4, Chrome, and Opera; Ogg for Firefox 3) as well as a Flash fallback for non HTML5 browsers with JavaScript disabled. Originally conceived by Kroc Camen as "Video for Everybody."

<!-- WebM/VP8 for Firefox4, Opera, and Chrome -->
<source type="video/webm" src="myvideo.webm" />
<!-- Ogg/Vorbis for older Firefox and Opera versions -->
<source type="video/ogg" src="myvideo.ogv" />
Zombo
  • 1
  • 62
  • 391
  • 407
Banning
  • 2,279
  • 2
  • 16
  • 20
  • Thanks for the reply. MP4 files do play in Firefox, since once I remove the space from the filename, the video does play in the Flash-based media player. If you open the media player in Firebug and review the Flashvars showing the encoded URL, the whitespace is double encoded to %2520, instead of just %20. I think this is causing the issue. However, I'm not sure how to fix that. – user2567054 Jul 17 '13 at 17:19
  • https://developer.mozilla.org/en-US/docs/HTML/Supported_media_formats?redirectlocale=en-US&redirectslug=Media_formats_supported_by_the_audio_and_video_elements --- "The MP4 container format with the H.264 video codec and either the AAC audio codec or the MP3 audio codec is natively supported by Internet Explorer, Safari and Chrome, but Chromium and Opera do not support the format. Firefox will soon support the format, but only when a third-party decoder is available." ..... BUT back to your issue... do you have control over the naming of the video file? Its never good to have spaces in names. – Banning Jul 17 '13 at 17:22
  • Unfortunately, I don't have control over the filename. I realize it's not common to put spaces in filenames, but it still should be supported in the media player. Spaces work fine when using HTTP URLs for Firefox and IE, but only work with RTMP URLs for IE. Having spaces in the filename in an RTMP URL doesn't work in Firefox. Is there a way to fix/resolve this in the media player? Thanks! – user2567054 Jul 18 '13 at 13:37
  • I'm really at a loss of what to do next to help ya out since I don't have an environment to work in and when you try to replace the space it comes up %2520. I'll try and do some googling and see If I can't find anyone else with the problem. Have you tried contacting the makers of the plugin and making them aware. Im sure they would like to know about this bug so they can improve on their plugin. – Banning Jul 18 '13 at 13:45
  • 1
    I will contact the developer of the media player and let them know about the issue. Thanks! – user2567054 Jul 18 '13 at 16:26