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.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Mute a youtube video via Javascript

Post by chivracq » Fri May 18, 2018 3:18 pm

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)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Mute a youtube video via Javascript

Post by chivracq » Wed Jun 27, 2018 9: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)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply