How to autoplay audiomack iframe - audio

With soundcloud you can add the parameter auto_play=true in the iframe src attribute to autoplay the audio file.
https://w.soundcloud.com/player/?visual=true&url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F494237829&show_artwork=true&auto_play=true
I'd like to do the same with an audiomack iframe. I have so far created the following iframe (see below) but have had no luck finding anything that works to allow this to autoplay. Is it possible? After hours of searching I can't seem to find anything helpful regarding this. Any guidance would be greatly appreciated!
<iframe frameborder="0" allowfullscreen="" src="https://audiomack.com/embed/album/shy-glizzy/fully-loaded"></iframe>

After contacting Audiomack support directly I received a reply stating that this is not supported and they do not plan to add support for this.

Audiomack engineer here. We actually do have an autoplay parameter so your embed code should look something like:
<iframe frameborder="0" allowfullscreen="" src="https://audiomack.com/embed/album/shy-glizzy/fully-loaded?autoplay=1"></iframe>
That being said, nowadays browsers tend to block media with autoplay because media playback needs to be the result of a user interaction. Sometimes they may allow autoplay if the media is muted (in the case of video) but obviously that doesn't help much here in the case of audio. Both SoundCloud and Audiomack embeds will attempt to play if possible but testing in Chrome, FF, and Safari right now yield similar results.

Related

How YouTube website can use autoplay feature function without DOMException

I wonder why YouTube can use autoplay feature without DOMException because when I tried to use <audio/> and <video/> tags with autoplay when loaded, It's show an DOMException error. I tried another way by set an attribute playInLines={true} and muted={true} it first, then called ref.current.play() and finally unmute it. Unfortunately, the browser isn't allow to play without user interact first by showing DOMException error.
When I using YouTube website, I noticed that YouTube won't autoplay until I switched back to YouTube tab, the video is autoplayed.
I searched from internet that YouTube website is built from the framework that load only the element that it needed, the other element won't refreshed.
Is YouTube a Single Page Application. If it isn't, when the user interacted first time on loaded, can the website play the videos forever? (not counted the AFK interruption (YouTube Premium user won't encountner this))
I don't have any knowledge but I guess that YouTube is using the both of <audio/> and <video/> tags.

Chromium - "Failed because the user didn't interact with the document first" in chrome?

Ok, autoplay on visit used to work on our site. However now, we are getting:
play() failed because the user didn't interact with the document first
How come autoplay works on Youtube though? For instance on open video in new tab.
Using HLS.js it no longer work.
What is Youtube doing that we could do here?
The latest version of chrome creates a per domain “score” if a user has interacted with media 20 times on a domain, it is allowed to auto play. If the interaction score is lower, it can't. Chrome has a post about this on the developer blog.

UWP WebView with audio tag not playing

I have WebView that is supposed to play some audio tags from webpages it is showing with similar code like this:
<audio preload="auto"
data-reactid="main.5.1.0x"
src="blob:https%3A//www.lsdfsdf.com/584b1e6d-47a6-4a58-a7d4-e5e7633c32a8">
</audio>
It seems it loads the audio but then doesn't play it. On a next click it loads again but then doesn't play it. I am now not sure if the loading doesn't work since it is a blob url or a permission issue with the WebView itself.
When I open the same webpage in a browser, everything works fine.

Display web sites and web apps with Chromecast

Can Chromecast be used to display a web site or web app? All the sample sender/receivers I've seen so far show how to play videos. The docs posted so far are minimal as best, just an API reference with little explanation what any of it does. I just want to send a URL of my choosing and have that page displayed on the TV. There's no user interaction required past that point. Assuming that's possible, does anyone have sample Chrome sender and receiver code for that?
I was able to modify the Github sample Project > googlecast/CastHelloText-chrome
to show a web page.
In the receiver.html file, I replaced the DIV with an IFRAME and styled it for 100% width and height.
Then in the displayText() function I changed innerHTML to src.
The only modification made to the sender chromehellotext.html was to replace YOUR_APPLICATION_ID with the app id created by registering the receiver.
Note that some sites like Google and Yahoo will not display inside an iframe. If you really needed to do that you could skip the iframe and just set window.location.href to the URL. That, of course, will overwrite your receiver code so the only way to change URLs would be to manually disconnect first and reload. I tried using window.open instead but that did not work.
One could imagine writing a Custom Receiver that has an iframe that wraps any website. Your sender would could then send webpages to your receiver, and the onLoad would set the the URL of the iframe. Don't have any code, but it's fairly simple to write.
There is a simple way to do that with the hellotext sample. You can send the html by typing that into the text field.
<iframe src="http://mywebpage.com" style="width:1280px;height:720px"></iframe>
To provide extra info from the current answer, as this post comes up near top on most searches.
Thing to search for is Digital Signage, this is the sort of industry word.
following GreenScreen Chromecast works okay. Greenscreen
host solution is Sign Simple - which looks to be same approach as Greenscreen without you needing to host the receiver web page.
Similar hosted solutions using Raspberry Pi can be found.
Of note: with GreenScreen and the CastHelloText, I could not get 1080p only 720p, some comments mention Video only in 1080p, but Images in 720p, which I take to mean html pages aswell.
Chromecast can indeed be used to display an arbitrary URL.
This can be done from plain old Chrome, using 'url-cast-receiver'. (Usable 'demo' page, GitHub project page.)

Showing a YouTube video in a Google Chrome extension

I would like to embed a YouTube player onto a page and show it to a user. If a foreground popup is used to host the player then, when the popup loses focus, the player is destroyed because the entire popup is removed.
I was hoping to use webKitNotifications.createHTMLNotification() and embed a player inside of an HTML Notification, but the spec has since been deprecated.
Just curious if anyone has any really crafty ideas on how to achieve this? I suspect hosting the YouTube player on a background page is a violation of YouTube's Terms of Service.
Looking through the dev. channel APIs:
http://developer.chrome.com/extensions/notifications.html - Too restrictive compared to HTML Notification. Doesn't look like I can embed a YouTube player inside one of these guys.
and... that's really about it.
Advice appreciated. Thanks.
You can simply have an HTML file in your extension for your page, for instance video.html, list it in your manifest under web_accesible_resources, and show it using:
chrome.tabs.create({url: chrome.extension.getURL('video.html')});
Inside your page you can use whatever method you want to embed the YouTube player.

Resources