I'm using the API wrapper Ruby Soundcloud.
I'm able to retrieve some soundcloud sounds & playlists info as well as update it.
Problem 1:
The "embeddable_by" doesn't update (it always stays at none even when I'm updating to "all" for example).
Problem 2:
If I set a sound to sharing:private (with embeddable_by:all), I get a "The sound can't be played outside of Soundcloud".
I do use the secret token in my url:
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/<%= #audiofile.soundcloud_url %>%3Fsecret_token%3D<%= #sc_token %>&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe><br />
What's weird is that if I'm getting the embed code from the Soundcloud website (on the sound page), it works. Also magically it starts working with my custom embed code! Isn't it weird?
Any help will be appreciated!
Looks like "streamable" must be set to "true" to make it work :/
Related
I've searched a bit here on SO to find a way to show instagram video using the public api ?__a=1 method. I've found a question that have pointed me into the right direction but not at all.
after I get the user media, I'm checking in my vue app if the resource is a video or an image and if is a video I show an html5 player where I'm binding the url that is obtained form the public json api. What I'm facing is that the player will not reproduce the video, but if I use the url into the browser, an html5 player is loaded with the related video that will start playing.
The video urls returned are something like this one:
"https://scontent-mxp1-1.cdninstagram.com/v/t50.2886-16/117420353_635186773777278_7723572524374891239_n.mp4?_nc_ht=scontent-mxp1-1.cdninstagram.com&_nc_cat=106&_nc_ohc=nI6tYDeag-0AX8MtmoL&oe=5F3C077B&oh=a47046b1aabf223f16c4c66526e20e57"
I've tried to remove all the part after the .mp4 file extension but this will not work, so I suspect that all the url is needed. Is there a way that I can use to reproduce video in my app?
After many tryes unfortunately I didn't figured out how to use my own HTML5 player so I've used a simple solution. An <iframe> with the url set will let the vido play into the app, this exclude me from the ability to remove the download button or controls from the player but at the moment it's the only way I can implement to achieve my scope.
(1) Your link works okay for me in a video tag:
<video width="640" height="480" >
<source src="https://scontent-mxp1-1.cdninstagram.com/v/t50.2886-16/117420353_635186773777278_7723572524374891239_n.mp4?_nc_ht=scontent-mxp1-1.cdninstagram.com&_nc_cat=106&_nc_ohc=nI6tYDeag-0AX8MtmoL&oe=5F3C077B&oh=a47046b1aabf223f16c4c66526e20e57"
type="video/mp4">
</video>
(2) It even works okay in this random demo that uses vue.js.
With no demo page of your problem the solution is a guess...
Make sure that your own site URL starts https:// or else change the video src to http://...etc.
Make sure your server (settings?) isn't somehow blocking you from loading the file.
If still failing, show us the problem via some link to your testing page.
I'm trying to have a short sound that I can play over multiple times by simply the play button on AMP. On Safari (desktop and mobile) the sound will only play once.
The sound is supposed to be triggered when the user clicks a button.
I've followed the amp documentation for the amp-audio and the audio events
<amp-audio preload="none" id="audio" controlslist="nodownload" hidden>
<div fallback><p>Your browser doesn't support HTML5 audio</p></div>
<source type="audio/mpeg" src="/media/shortSound.mp3">
<source type="audio/ogg" src="/media/shortSound.ogg">
</amp-audio>
The "native" audio button is hidden and is triggered by clicking the following button (with the on:tap event)
<div class="button" on="tap: audio.play" role="button" tabindex="0"></div>
I have also tried using absolute URLs in vain and using the pause function before play but to no avail.
Note: Unfortunately there is no .load event to circumvent the problem like with HTML5 on Safari (which is how I got to play it on Safari on the non-amp version)
Actual result: The sounds play once (the first time I click it). The rest of the time nothing happens, no message in the console either. What am I doing wrong?
I have found the issue was with the mp3 encoding of my files. It uses VBR instead of CBR, the problem doesn't happen when using CBR encoded mp3 files. To check your encoding I recommend using https://checkmate.gissen.nl/download.php
EDIT: IT was actually because Safari uses HTTPRange to get its resources instead of a classic get method.
Hopefully the loop attribute on <amp-audio> can help here: https://amp.dev/documentation/components/amp-audio/?format=websites
I found a script that lets me use the Youtube API to access a channel, recognise if there is any live stream and give me the id of this specific video that is being broadcasted.
However, when it is embedded on my page as:
<iframe width="500" height="600" src="//www.youtube.com/embed/{$this->live_video_id}{$autoplay}" frameborder="0" allowfullscreen>
I cannot play it. The video shows up, and when I press "play" it gives me a "Playback error".
I removed the $autoplay part because this was giving me problems and it worked! And then it didn't work. It's so frustrating. I copy-pasted the url only in my address bar
www.youtube.com/embed/[Whatever the id is here]
and it worked! And then it didn't work. I just cannot understand why it works sometimes and sometimes not.
Everytime I do something it works for 5 seconds and then it breaks and it doesn't want to show it. When I closed the live stream to try with another one. It showed the old (already archived) live stream. Nonsense!
I read somewhere that you need to embed the video from the live stream, but then the whole idea to use an API is futile. Also I tried enabling AdSense because this could also help, but it didn't.
What can I do to get an embedded YouTube live stream video on my website?
Update:
Since I couldn't figure it out and YouTube tightened their API quota points a lot as of February 2019. I just switched to Twitch API and everything worked from the first try.
You haven't closed the iframe tag
Correction in code
<iframe width="500" height="600" src="//www.youtube.com/embed/{$this->live_video_id
{$autoplay}" frameborder="0" allowfullscreen></iframe>
Source
I am trying to upload an image to my cloudinary account, using cloudinary-widget. Now it works nice and easy on chrome, firefox, but not on opera.
Widget loaded like this in the <body> tag:
<script src="//widget.cloudinary.com/global/all.js" type="text/javascript"></script>
Error shown in Opera's console:
GET https://widget.cloudinary.com/global/all.js net::ERR_BLOCKED_BY_CLIENT
It is happening as well on a codepen example.
In case it makes a difference, I am using meteor & react. Though I don't think it is related.
UPDATE: The problem above happened due to the use of privacy-badger extension. While it is possible to set privacy-badger to allow cloudinary to go through, I guess if I would have users using it, they would just see a broken page and would move on, instead of trying to handle it.
If anyone has a solution already I would like to get help, if not I'll post later own my solution once I have one.
Something seems to have changed recently (early Nov 2014) in the way the example buttons work to start a Hangout On Air (HOA). https://developers.google.com/+/hangouts/button
I have been using this example code from the link above as a starting point to make a "Create a Hangout On Air" button on my website.
<script src="https://apis.google.com/js/platform.js" async defer></script>
<div id="placeholder-div3"></div>
<script>
gapi.hangout.render('placeholder-div3', {
'render': 'createhangout',
'hangout_type': 'onair',
'initial_apps': [{'app_id' : '184219133185', 'start_data' : 'dQw4w9WgXcQ', 'app_type' : 'ROOM_APP' }],
'widget_size': 175
});
</script>
The initial_apps line is supposed to cause the HOA to automatically start the Youtube hangouts app (the app_id) with a particular video (the start_data). A couple weeks ago this was working. Now it is not. The initial_apps parameter seems to have no effect on the initial start of my HOA.
Another change I have noticed is that when I press the Create a Hangout button, I am now taken to a Google+ page where I enter a name for the hangout and guests, and then I have to push another button to actually start the HOA. This extra button push was not around previously.
I don't particularly care about the Youtube app starting, but I do care about my own app starting with my own start_data.
Has something changed recently? Why is this not working?
UPDATE: As of 16-Nov-2014, this bug seems to be fixed.
Yeah I am facing the same problem.
My app also doesn't get loaded properly. Most of the times I get can't load app because the app is not communicating with the server.
I figured out that the Hangouts On Air button works as expected only when you add an 'invites' attribute with at least two people in the list. Not zero, not one. Two or more.
I feel like this is indeed broken. There should be means of passing initial_apps data without requiring that invitees be submitted in the button.
I had this same problem and John L's solution worked for me. It seems Google fixed this bug and it's now working like before so you don't need to have at least two people in the invites attribute anymore.