These are chat archives for AxisCommunications/locomote-video-player

18th
Nov 2014
deejayprod
@deejayprod
Nov 18 2014 13:31
Hi Guys
Alexander Olsson
@noseglid
Nov 18 2014 14:06
Hello
deejayprod
@deejayprod
Nov 18 2014 14:34
I opened an issue
we did some tests with locomote to open some streams provided by a wowza media server
Alexander Olsson
@noseglid
Nov 18 2014 14:35
I saw, thanks! The parsing we do for RTMP is really rudimentary. everything after the port is considered the "stream" passed to the NetStream object.
I'd love to see some better parsing on that
deejayprod
@deejayprod
Nov 18 2014 14:36
ok, but We did some implementations of flowplayer or wowza's own rtmp player, and they are not using a single url but 2 parameters
server (netConnectionURL on flowplayer) and streamName
Do you think it's possible to add this feature?
Alexander Olsson
@noseglid
Nov 18 2014 14:37
Ah, that doesn't fit well with the current 'play' API.
deejayprod
@deejayprod
Nov 18 2014 14:37
Yes we saw that
Alexander Olsson
@noseglid
Nov 18 2014 14:38
I wonder if there could be some way to include it in one string, so to keep the API intact. Or if we in fact should take 2 parameters.
deejayprod
@deejayprod
Nov 18 2014 14:38
but it's really hard to parse, because every component of the url are optionnal
rtmp://[wowza-address]:[port]/[application]/[appInstance]/[prefix]:[path1]/[path2]/[streamName]
Alexander Olsson
@noseglid
Nov 18 2014 14:38
what can [prefix] contain?
deejayprod
@deejayprod
Nov 18 2014 14:39
[wowza-address], [application], [appInstance], [prefix] and pathes are optionnal
it can contain
flv, mp4 or mp3
flv is default value
Alexander Olsson
@noseglid
Nov 18 2014 14:39
I see. Is this wowza specific or can I find reference to this any spec from Adobe?
deejayprod
@deejayprod
Nov 18 2014 14:41
it's a trick supported by wowza
in the spec
we have the 2 parameters
NetConnection An object that is a higher-level representation of
connection between the server and the client.
NetStream An object that represents the channel over which audio
streams, video streams and other related data are sent. We also
send commands like play , pause etc. which control the flow of the
data.
but the prefix with default value flv is also in spec
at page 39
Name of the stream to play. |
| | | To play video (FLV) files, specify the |
| | | name of the stream without a file |
| | | extension (for example, "sample"). To |
| | | play back MP3 or ID3 tags, you must |
| | | precede the stream name with mp3: |
| | | (for example, "mp3:sample". To play |
| | | H.264/AAC files, you must precede the |
| | | stream name with mp4: and specify the |
| | | file extension. For example, to play the|
| | | file sample.m4v,specify "mp4:sample.m4v"
Gaétan Collaud
@gaetancollaud
Nov 18 2014 14:43
Hello, another option would be to have an optional parameter for the play method. If we have two parameters, the first is the server and the second is the stream name. If we have only one, we keep the current behavior.
deejayprod
@deejayprod
Nov 18 2014 14:44
Yes we had this idea too
Alexander Olsson
@noseglid
Nov 18 2014 14:44
From what I can see this originates from the class we use for playback NetStream. It appears as the NetConnection) class supports the protocol:[//host][:port]/appname[/instanceName] syntax.
I guess both ideas are decent actually.
deejayprod
@deejayprod
Nov 18 2014 14:45
yep
I'm not an action script expert...maybe we can also change the type of the parameter from String to Object
and check if it's a String -> URL, Object with 2 fields -> RTMP Object
Alexander Olsson
@noseglid
Nov 18 2014 14:46
That's a third option. Commonly used in javascript and other ECMAScript derivatives.
deejayprod
@deejayprod
Nov 18 2014 14:47
Yes, and it can open doors for future with retro-compatibility...
Alexander Olsson
@noseglid
Nov 18 2014 14:47
The wowza string, for parsing, one would typically split on the rightmost : then do a NetConnection.connect on the left part, and a NetStream.play on the right part.
Shouldn't be too difficult I think.
deejayprod
@deejayprod
Nov 18 2014 14:48
yep, but if we have no prefix it will not work
The optionnal parameter is the better solution
(I think)
Alexander Olsson
@noseglid
Nov 18 2014 14:48
No? Looking at the documentation for play: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#play() - it appears as it should work?
deejayprod
@deejayprod
Nov 18 2014 14:50
we must handle the cases :
1 :
2 : (protocol + port)
3x : (protocol + port + prefix)
2x : (protocol + prefix without port)
Alexander Olsson
@noseglid
Nov 18 2014 14:53
Right.. just splitting on colon would screw that up..
and looking for multiple colons wouldn't work either because it's difficult to know if it is the host:port colon or the prefix colon.
deejayprod
@deejayprod
Nov 18 2014 14:56
Is it possible to add an optional parameter for play method?
Alexander Olsson
@noseglid
Nov 18 2014 14:57
I think we must.
deejayprod
@deejayprod
Nov 18 2014 14:58
ok, we can do it if you want and the we'll do a pull request
Alexander Olsson
@noseglid
Nov 18 2014 14:58
It's funny, looking at wowza documentation: "Note: The short form cannot be used."
That'd be great! I'm not sure when I can get around to do it, but I'll keep the ticket open as a tracker for the issue until it has been resolved.
deejayprod
@deejayprod
Nov 18 2014 15:00
ok I will see with Gaetan
Gaétan Collaud
@gaetancollaud
Nov 18 2014 15:00
I will see if I can do something today.
Alexander Olsson
@noseglid
Nov 18 2014 15:00
But an extra parameter should be fine, this can be forwarded to the RTMP client by Player.as, without Player to even know if it is set or not.
great
deejayprod
@deejayprod
Nov 18 2014 15:01
great
see you
Alexander Olsson
@noseglid
Nov 18 2014 15:01
Can I close #107 ?
deejayprod
@deejayprod
Nov 18 2014 15:02
aww yes, sorry
you can't delete?
Alexander Olsson
@noseglid
Nov 18 2014 15:02
Don't worry about it.
Gaétan Collaud
@gaetancollaud
Nov 18 2014 15:51
AxisCommunications/locomote-video-player#109
What do you think ?
It works for me
also, do you plan to merge my other pull request (AxisCommunications/locomote-video-player#101) ? It's been almost a month that I proposed it.
Alexander Olsson
@noseglid
Nov 18 2014 16:18
@gaetancollaud Thanks. I'll have a look at it in the morning. Regarding #101 , I've been thinking whether or not it is up to the library, but as it embeds the player I don't have a problem with it destroying it as well. I will probably merge this shortly! Sorry for the delay :(