Mute a youtube video via Javascript

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Re: Mute a youtube video via Javascript

by chivracq on Fri May 18, 2018 8:18 am

natejasper wrote:Hello, give me some recomment please,
Anyone able to mute a youtube video via Javascript?
Thanks for your time,

Oh...!, very good, you managed to give a Descriptive Title "this time" to your Thread... :D
(I had disapproved some earlier Thread you had tried to open about 1 month ago because of its "useless" (= Non-Descriptive) [=> "not working" :roll: ] Thread Title, thinking you would reopen a new Thread, but you never did, ah-ah... (You can still open that Thread if you want, I had copied&pasted your original Content in the Disapproval Notification you must have received per E-mail...))

But hum, you still haven't read the Forum Rules, and the "Quality" of your Post is still pretty low...
=> CIM...! :mrgreen: (Read my Sig...)

(Not sure what you mean with "recomment" btw... :? )

You don't mention what you've tried, and I'm not too sure what you mean with "via Javascript" and why you would need any JS as you can toggle the Sound of a YT Video ON/OFF with the simple following 'TAG' Statement:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
'URL GOTO=https://www.youtube.com/watch?v=4herWkGMiaM
TAG POS=1 TYPE=BUTTON ATTR=CLASS:ytp-mute-button<SP>ytp-button&&DATA-VISUAL-ID:6&&TXT:
(Tested on iMacros for FF v8.8.2, PM v24.6.6 (=FF47), Win10_x64.)
The same 'TAG' Statement will mute/unmute your Video...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7313
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Mute a youtube video via Javascript

by chivracq on Wed Jun 27, 2018 2:08 pm

Posting on behalf of some New User for whom I don't want to approve their Post to grant them Access to the Forum (yet...) as they were unnecessarily advertizing for some Site and they seem to be a very notorious Spammer from a Check on their IP-Address... :shock:

But their Reply still looks relevant to me for the Thread, so I'll still post it... 8)

Re: Mute a youtube video via Javascript
by david1223 on 27/06/2018 - 21:25
[This post is waiting for approval]

[... (Edited by Moderation) ...] have provided me with a code by which I can mute youtube video via javascript.

Code: Select all
var player;

function onYouTubeIframeAPIReady() {
player = new YT.Player('ytplayer', {
events: {
'onReady': onPlayerReady
}
});
}

function onPlayerReady(event) {
player.mute();
player.playVideo();
}


>>>

:arrow: Hum..., @TechSup, I had recently reported this Thread actually to be completely deleted as it turned out to be a "Fake" Thread (Copy&Paste of some identical (older) Thread) by some Fake User/Spammer, maybe you can simply delete the first Post from @OP... and/or merge this Thread (without the spammy Post from @OP of course) with the original one:
- Turn off sound/mute youtube (July 2013 - No Replies)

And hum, this is actually a bit of a "mess", because that original Thread (without any Reply) had already been copied previously by some other Fake User, 6 months ago, and to which I had replied with 3 Solutions, without realizing it was a Fake Duplicate...:
- Re: Turn off sound/mute youtube (Decb 2017 - 1 Reply with 3 Sols)

=> In some "perfect" World, we would actually need to merge those 3 Threads together, ah-ah...! :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7313
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to General Support & Discussions

Who is online

Users browsing this forum: Bing [Bot] and 13 guests

-->