Closed alvaromlg closed 7 years ago
The convention is to include the prefix within the RTMP URL, e.g.
rtmp://cp67126.edgefcs.net/ondemand/&mp4:mediapm/ovp/content/test/video/spacealonehd_sounas_640_300.mp4
Your change would break that by duplicating the prefix. Also it's not the case that the prefix should always be the same as the file extension, as with your example of mp4:samples/record1.f4v
.
Yes, that's a fix to show a use case, that code would also break .mov and .m4v that's why I am asking if you are interested on a pull request.
It should be: mp4, f4v, m4v, mp4 -> mp4: aac, m4a, f4a -> aac: flv -> flv: mp3 -> mp3:
In my experience working with CDNs (Edgecast, Wowza, Akamai) I have never seen the prefix and I have seen other popular flash players implementing some kind of switch to parse the prefix and provide it to the play() method.
Anyway it can be closed if you guys are not experiencing this issue, it might be a CDN configuration issue. Also the parsing could be done outside flash in the server.
I think that this change would risk breaking too much stuff. It could potentially be alleviated by making it an option that defaults to false but I would prefer not to add options as well.
Unless there's a lot of demand for this, I think we'd want to pass.
In the NetStream documentation http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#play() it says the extension must be provided for on demands.
In my tests, some CDNs like Edgecast are not working if the extension is not specified like this
ns.play("mp4:samples/record1.f4v");
I fixed this, would you guys be interested in a pull request for this? Now is playing rtmp on demands served from Edgecast CDN
It would be something like this: