Starting RTSP stream in a MUTED state?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
pstone3
Blank Cone
Blank Cone
Posts: 11
Joined: 03 Dec 2015 22:07

Starting RTSP stream in a MUTED state?

Postby pstone3 » 04 Dec 2015 18:07

Greetings all!

I've got the following working fine but I want the stream to start up in a MUTED state. Firing off the vid.audio.toggleMute() doesn't work because that only engages once the video has started playing and well, the stream takes a second to start so the mute command is lost.

Is there a way to do this in the EMBED below which works just fine? I've tried all types of ONLOAD, ONPLAY, etc... to fire the script off but those are not firing.

<embed pluginspage="http://www.videolan.org"
type="application/x-vlc-plugin"
version="VideoLAN.VLCPlugin.2"
id="src{$box.name}"
width="200"
height="120"
autoplay="yes" loop="no"
target="rtsp://{$box.ip}/stream.sdp"
/>

btw yes, I'm using smarty which injects the IP into the target params along with the name of the stream in the id.

volume="0" doesn't work either.

Oh and once loaded, a button created to fire off the mute command works just fine so I know the muting functionality works.

UPDATE: So for some reason the audio.setVolume doesn't seem to be supported anymore?
My entry:
vid_unit_name.audio.setVolume = vol; or = "0"; returns the error: "undefined is not an object (evaluating 'vid_unit_name.audio...etc)"
Sooo... ???

Peter

da2424
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 16 Apr 2013 16:57

Re: Starting RTSP stream in a MUTED state?

Postby da2424 » 05 Dec 2015 13:59

The correct attribute would be mute="true", but this doesn't work at the moment.
You could use volume="0" instead, but at the moment, this works only in Internet Explorer.
These bugs are known and should be fixed in v2.2.2 release.

You could use the event MediaPlayerPlaying and set the volume at this time to 0.

Documentation of all tag attributes:
https://wiki.videolan.org/Documentation ... attributes

Documentation of the audio object:
https://wiki.videolan.org/Documentation ... dio_object

pstone3
Blank Cone
Blank Cone
Posts: 11
Joined: 03 Dec 2015 22:07

Re: Starting RTSP stream in a MUTED state?

Postby pstone3 » 05 Dec 2015 18:03

Thanks for the info - If I have to use MediaPlayerPlaying as an after the fact, I'll just create a button called MUTE ALL to trigger manually until v2.2.2
btw, I'm using OSX-El Capitan-Safari

keitho
New Cone
New Cone
Posts: 1
Joined: 09 Feb 2016 18:47

Re: Starting RTSP stream in a MUTED state?

Postby keitho » 09 Feb 2016 18:52

Does anyone know if this was addressed in 2.2.2? I upgraded and am still having an issue having the web plugin start up muted. Here is the code I am using. Maybe it it wrong as I am not really a developer.

<object ID="MediaPlayer" WIDTH="1000" HEIGHT="720" CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject" CODEBASE="http://activex.microsoft.com/activex/co ... 6,4,7,1112">
<param name="autoStart" value="True">
<param name="filename" value="rtsp://x.x.x.x:88/videoSub">
<param NAME="Controls" VALUE="True">
<param NAME="ShowStatusBar" VALUE="True">
<PARAM NAME="mute" VALUE="True">
<PARAM NAME="Volume" VALUE="0">
<embed PLUGINSPAGE="http://www.videolan.org"
TYPE="application/x-mplayer2"
VERSION="VideoLAN.VLCPlugin.2"
SRC="rtsp://x.x.x.x:88/videoSub"
NAME="MediaPlayer"
WIDTH="440"
HEIGHT="250"
autostart="1"
mute="True"
volume="0"
controls="1">
</embed

da2424
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 16 Apr 2013 16:57

Re: Starting RTSP stream in a MUTED state?

Postby da2424 » 09 Feb 2016 20:17

Does anyone know if this was addressed in 2.2.2?
The issue is fixed in v2.2.2.

I upgraded and am still having an issue having the web plugin start up muted. Here is the code I am using. Maybe it it wrong as I am not really a developer.
Yes, your code is wrong. Here is a corrected version:

Code: Select all

<object id="MediaPlayer" width="1000" height="720" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"> <param name="autostart" value="true"> <param name="src" value="rtsp://x.x.x.x:88/videoSub"> <param name="controls" value="true"> <param name="mute" value="true"> <embed type="application/x-vlc-plugin" src="rtsp://x.x.x.x:88/videoSub" name="MediaPlayer" width="1000" height="720" autostart="true" mute="true" controls="true" /> </object>


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 17 guests