When an absolute path is given to a file that resides at an address starting with mms:// instead of http:// the base url is placed in front of the mms:// url causing an incorrect address to be given to the media player.

Output to player from video.module:
http://www.sitename.com/mms:/sitename.com/video/intro.wmv

Best solution would be to make an address that starts with mms:// absolute.

Comments

fax8’s picture

Good catch.

This is a conseguence of

  if (!preg_match("/^(ht|f)tp(s?):\/\//", $video_path)) { //If path is not absolute.

The regex does not match mms:// uri.
Please sostitute that line with

  if (!preg_match("/^(http|ftp|mm)(s?):\/\//", $video_path)) { //If path is not absolute.

and check if this works.

Fabio

Darryl-1’s picture

That fixed the problem!

The only remaining issue that might occur down the road is that downloading of wmv files via the download link from an address that has mms:// might not be possible due to it being a stream.

It might be a good idea to disable downloading of videos that start with mms://

Thanks!
-Darryl

fax8’s picture

Title: Absolute url » Absolute url and streaming protocols

great. this fixes will be inserted on next cvs commit.
I'm working on a lot of things at the same time.
As soon as other stuff is ready I will commit this.

I received an email asking how to use rst urls like:
rtsp://somewhere.somewhere/somewhere./myclip.mp4

I'm not an expert in rstp but maybe changing that line to:

if (!preg_match("/^(http|ftp|mm|rstp)(s?):\/\//", $video_path)) { //If path is not absolute.

could enable using of rstp uris.

Just give a try.

Fabio

janv@www.drupalsites.net’s picture

I changed the line as pointed out and tried with an rstp url, but it doesn't work.

fax8’s picture

ok.. the solution is a bit harder... some hacks to the code will be necessary..

Have a look at http://www.soundscreen.com/streaming/embed_streams.html
there is a good tutorial on how to embed quicktime streams.

You will need to modify the video module in order to produce the needed code.

I can't do this (too many things to do ... ) but I will help you if will try to implement this.

Fabio

Darryl-1’s picture

When an absolute path is given to a file that resides at an address starting with mms:// it removes the mms: when getting sent to the media player. Also the slashes should be forward slashes but it doesn't seem to want to give me forward slashes.

The following example was not uploaded via the upload.module and is under the same
domain as drupal.

Input to video.module:

mms://www.mysite.com/etc/intro.wmv

Output to player from video.module:
\\www.mysite.com\etc\intro.wmv

fax8’s picture

mms protocol should work again.

fax8’s picture

Status: Active » Fixed

setting this as fixed. Feel free to reopen this if you still have problems.

Fabio

Anonymous’s picture

Status: Fixed » Closed (fixed)