How to get RTMP URL - streaming

I know this question was asked a lot, many of them were answered by viewing the source code, in my case it didn't work, using Internet Download Manager, i got the following link :
rtmp://178.162.202.6/live/fsdlfmlll2?id=247301&pk=a9930efdccdd78b9c127ef17a4150224b859aa6d3ec13c11129a10fd54edf7dd
This link is valid only on IDM, but on a player it's not, I'm trying to get the rtmp from HERE (Press any streaming item, for updated links) .
The source code doesn't include anything related to rtmp, and the " Inspect Element / Network " is adding these :
http://www3.javabin.xyz/swf/57163b78560f4-7246945710.swf
http://www3.javabin.xyz/swf/833.m3u8?sf=NTcxNjNiNzg1NjBmNA==&token=M3mEC-3m9nJVB1WzLxTN4Q

You have two options. The shown code can be previewed by testing here.
(1) Embed the video directy from DailyMotion (using i-frame) :
<html>
<body>
<iframe width="720" height="480"
src="http://www.dailymotion.com/embed/video/x482s3s?autoplay=0">
</iframe>
</body>
</html>
Use autoplay=1 if you want it to play automatically.
(2) Get URL from middle-man (a link downloader) :
The video you want is server-protected. That means here the server makes a temporary access token for each connection. One link today will not always work tomorrow because that token has expired. So each time you must know how to create a fresh token for access. Since that is difficut we use a next system (middle man) that can already do it for us....
For example using this downloader site as middle-man, GetVideo.at, you can get a JSON array of links by giving the url http://getvideo.at/search?q=VIDEO_URL where VIDEO_URL is your link to video page (Dailymotion, Youtube, Vimeo etc).
(2.1)
So regarding your Dailymotion video that link looks like :
http://getvideo.at/search?q=http://www.dailymotion.com/embed/video/x482s3s
When you got to that above link you get a JSON object (text) something like this:
{"video_formats": [{"quality": "240", "filename": "skipback_20160501_1600 (06).mp4", "url": "/download?id=064398ee-1d20-11e6-865b-06c0b400153d", "format": "mp4"}, {"quality": "384", "filename": "skipback_20160501_1600 (06).mp4", "url": "/download?id=064405a4-1d20-11e6-865b-06c0b400153d", "format": "mp4"}, {"quality": "480", "filename": "skipback_20160501_1600 (06).mp4", "url": "/download?id=06442dd6-1d20-11e6-865b-06c0b400153d", "format": "mp4"}, {"quality": "720", "filename": "skipback_20160501_1600 (06).mp4", "url": "/download?id=064462a6-1d20-11e6-865b-06c0b400153d", "format": "mp4"}], "thumbnail": "https://s1-ssl.dmcdn.net/Wp3_C.jpg", "audio_formats": [], "duration": "02:42", "title": "skipback_20160501_1600 (06)"}
(2.2)
As you can see, for a Quality : 240p video the URL is :
/download?id=064398ee-1d20-11e6-865b-06c0b400153d
So to play MP4 we combine http://getvideo.at with text extracted from shown URL from JSON. So the final link playable in HTML5 video tag (src=) is like this :
http://getvideo.at/download?id=064398ee-1d20-11e6-865b-06c0b400153d
(2.3)
Use it as <source src="http://rest of link" when setting up the video tag.
<html>
<body>
<video id="myVideo" width="400" controls>
<source src="http://getvideo.at/download?id=471c4a8a-1b24-11e6-9917-06c0b400153d" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<p> Original Source : DailyMotion. </p>
<script>
var vid = document.getElementById("myVideo");
vid.volume = 0.2;
</script>
</body>
</html>
NOTE: I don't use Ruby, to use this second method, your app must always check that Getvideo.at link for a JSON of the correct links. JSON is just text... So either use Ruby's JSON parser or just use String functions to extract the link text. If you put that link to a String variable you can do something like below in the video tag:
<source src=$myLinkString type="video/mp4">

I assume you did something like this (looking in the HTML) to find the rtmp address:
https://msankhala.wordpress.com/2014/10/01/save-flash-player-video-rtmp-streaming-with-vlc-player/
I went four levels deep in iframes and I didn't find that address. Did you try on a VLC player?
Good luck.

Related

Facebook Open Graph Image

I had to restore a php page from an old version and now facebook debugging is not finding the og:image tag any more.
A share url is: https://maltishlanguage.com/dictionary/0603/
If I share debug the link on the LinkedIn post inspector, the og:image is shown correctly.
in the tag, I have an og:image (http jpg URL) and a og:image:secure (https jpeg URL)
The Graph API Explorer gives a good image:
{
"url": "https://maltishlanguage.com/dictionary/0523/rude/1?s=s",
"type": "website",
"title": "Maltish - I am turning round in the nothing",
"image": [
{
"url": "http://maltishlanguage.com/images/fbMaltishLanguageDictionary.jpg"
}
],
"description": "Maltish Dictionary entry from the Expression 'Qed indur fix-xejn '",
"updated_time": "2022-07-21T05:24:04+0000"
}
#Cbroe solved the issue for me, many thanks and sorry i did not understand you initially, but I just checked by setting Google into cookieless mode which showed the error where I had a session check, but in the else I was still tryiong toe read the session if not set and it was thoring the error #CBroe mentioned!
Solved and it's working now :)
So issue was that a PHP error was being written to the outpu HTML in the HEAD tag.

Chrome packaged application - downloading file from Webview

I am working on getting an existing Ajax style web application functional as a Chrome packaged app. The Ajax app is running in a Webview inside the packaged app and is mostly working great.
The Ajax app allows users to upload documents using standard HTML 5 upload and drag/drop. Uploads work fine but downloads are not working.
This is a simplified sample of the logic in the Ajax app. It uses Javascript to handle the click event, performs some logic, and then eventually triggers the download by setting the location of a hidden IFrame.
<html>
<head>
<script type="text/javascript">
function downloadFile(url) {
window.frames['dataTransfer'].location = url;
}
</script>
</head>
<body>
Google<br/>
Download PDF<br/>
Download PDF JS<br/>
<iframe name="dataTransfer" style="width: 0; height: 0; border: none;"></iframe><br/>
</body>
</html>
If you run this in a standard Chrome tab all 3 links work fine. However in a Chrome App only the first 2 links work - clicking the 3rd link does nothing. In the network section of the Developer tools it actually appears to start the download but then is quickly cancelled.
The manifest of the Chrome app allows Webview and the relevant domains involved.
{
"manifest_version": 2,
"name": "Test Download",
"version": "0.1.0",
"permissions": [
"webview",
"<DOMAIN OF THE SAMPLE PAGE ABOVE>",
"https://s3.amazonaws.com/"
],
"app": {
"background": {
"scripts": ["background.js"]
}
},
"icons": {},
"minimum_chrome_version": "28"
}
The Chrome App has some simple newwindow handling in it as well.
window.onload = function() {
var webview = document.querySelector('#app-webview');
webview.src = '<URL TO SAMPLE PAGE ABOVE>';
webview.addEventListener('newwindow', function(e) {
e.preventDefault();
e.stopPropagation();
window.open(e.targetUrl);
});
};
Any suggestions on how to get downloads working (hopefully without requiring significant changes to the Ajax app)?
File downloads from the webview guest are gated by a permissionrequest event per download attempt. The default response is to deny download permission.
Note: The download permissionrequest will not land until Chrome 30 now, and it appears that documentation has not yet been made available. It is generally a stable API though, and it is unlikely to change between now and then.
In order to override this behavior, you need to handle the event and explicitly allow the download to happen. As an example:
var webview = document.querySelector('#app-webview');
webview.addEventListener('permissionrequest', function(e) {
if (e.permission === 'download') {
e.request.allow();
}
});
The event includes additional information (such as the download URL in e.url) in case you want to further filter your grants.
Be aware that this will only permit the download to happen using the regular Chrome file download experience, which isn't necessarily what you'll want from within a packaged app. Your options are limited until the chrome.downloads API is made available to apps.
One possibility is to deny the download request, grab the URL from the event, and manually manage the download process with XHR, the fileSystem API, and whatever UX you want to build.

Embed HTML5 widget from normal soundcloud URL

I'm trying to turn submitted Soundcloud links on my website into SoundCloud HTML5 players. I read that this is possible with oEmbed but haven't gotten it to work myself yet. What I know is that I should use the following oEmbed URL:
http://soundcloud.com/oembed?format=js&url=[escaped_url]&iframe=true
However, I have no idea what to do with it. When I have an escaped SoundCloud URL and replace it with [escaped_url], what's my next step? How do I exactly use that link to generate the SoundCloud HTML5 player?
Send a request to that URL, and the response will be a JSON file containing all the information you need to create the widget.
Here's an example:
$ curl http://soundcloud.com/oembed\?format\=js\&url\=https://soundcloud.com/spadgos\&iframe\=true
({
"version": 1.0,
"type": "rich",
"provider_name": "SoundCloud",
"provider_url": "http://soundcloud.com",
"height": 450,
"width": "100%",
"title": "nickf \u2603",
"description": "",
"thumbnail_url": "http://i1.sndcdn.com/avatars-000005187616-3e82aa-t500x500.jpg?b96a101",
"html": "\u003Ciframe width=\"100%\" height=\"450\" scrolling=\"no\" frameborder=\"no\" src=\"http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fusers%2F6431392\u0026show_artwork=true\"\u003E\u003C/iframe\u003E",
"author_name": "nickf \u2603",
"author_url": "http://soundcloud.com/spadgos"
});
Just grab the html property and stick that in your document and that should be it.

Set Size of SWF posted to Facebook with Feed Dialog

Is there a way to set the dimensions of a swf posted to Facebook using the feed dialog, either javascript or direct url method?
https://developers.facebook.com/docs/reference/dialogs/feed/
I'm not 100% certain that this works anymore as I've tried to add this with the Feed dialog as opposed to the sharer and it seemed to have no effect at all. It may have been replaced by the source parameter in the newer feed dialog API (which I don't think you can define a width/height for. Please correct me if I'm wrong) ..
but,
take a look at media attachments in the stream attachment guide:
https://developers.facebook.com/docs/guides/attachments/
you would pass in a JSON encoded object as the media URL param.
{"media": [{
"type": "flash",
"swfsrc": "http://www.mapsofwar.com/photos/EMPIRE17.swf",
"imgsrc": "http://icanhascheezburger.files.wordpress.com/2009/04/funny-pictures-hairless-cat-phones-home.jpg",
"width": "80",
"height": "60",
"expanded_width": "160",
"expanded_height": "120"
}]}

Connect to Facebook with Javascript Client Library using Adobe AIR

I'm having an issue connecting to Facebook through the Javascript Client Library in Adobe AIR. It works fine in the browser but in Adobe AIR it seems to not be able to find the Facebook functions. Here is some code I copied from the Facebook website: (Oh and I have the xd_receiver.htm file in the correct path too)
<textarea style="width: 1000px; height: 300px;" id="_traceTextBox">
</textarea>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
//
var api = FB.Facebook.apiClient;
// require user to login
api.requireLogin(function(exception){
FB.FBDebug.logLevel=1;
FB.FBDebug.dump("Current user id is " + api.get_session().uid);
// Get friends list
//5-14-09: this code below is broken, correct code follows
//api.friends_get(null, function(result){
// Debug.dump(result, 'friendsResult from non-batch execution ');
// });
api.friends_get(new Array(), function(result, exception){
FB.FBDebug.dump(result, 'friendsResult from non-batch execution ');
});
});
});
//]]>
</script>
It's not that simple actually man, the problem with loading external script files from the application sandbox is that it's not supported. Technically, by using iframes, you should be able to do this and it works but it's still impossible to use XFBML in the root document after from my experience. After two days of trial and error, the easiest way to do use Facebook Connect in an html/ajax adobe air application is to download the actionscript library and include it as such:
<script type="application/x-shockwave-flash" src="lib/facebook.swf"></script>
<script type="text/javascript">
var FB = window.runtime.com.facebook;
var fb = new FB.Facebook();
var session = new FB.utils.DesktopSessionHelper();
//etc...
</script>
then just refer to the documentation. my only problem now it that I still haven't found an efficient enough way of using XFBML in adobe air, simply adding the facebook namespace to the html tag doesn't do the trick unfortunately. If any knows, please do share thanks
you also need to change xml namespace (main html tag) to this:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en-gb" lang="en-gb">