Hide the source URL on HTML 5 audio player - php

Can I hide the source URL in the HTML 5 audio player? I am using audiojs api to make my web audio player now, but I don't know how to hide the source URL. Should I use other way to make the audio player, I can use PHP, jQuery and javascript to do that. This is my assignment, please help me.

You can't hide the source URL.
The source URL is required for the browser to be able to get to the audio data. The URL must be available in some form. Now, you can redirect to it, load it with JS, etc., but at the end of the day anyone can look in the network tab and see that URL.

Related

Downloading a video from a php page

I want to download a video on example.com, but it's "protected" by a flash player.
By inspecting the HTML code of the page, I've been able to get the direct URL to the mp4 video from the player's parameters, something like example.com/video.mp4.
When I try to go to example.com/video.mp4, I just get a blank page mentioning access denied. I figured that you need to do a specific request in order to get the video.
I analyzed traffic while reloading the page and playing the video through the player, and I've been able to get the right URL, which is along the lines of example.com/get_video.php?param1=some_hash&param2=some_hash&filename=video.mp4
When I visit example.com/get_video.php?param1=some_hash&param2=some_hash&filename=video.mp4, I do have the video playing alone, with no other content, in my browser's default player. But when I try to save it, the dialog box wants to save the PHP page...
How do I save the video now that I have it ?
Thanks.

Embedding Video Stream into webpage

This is a progress after the question Embedding Image/Video Stream into webpage that was answered for the picture only using curl, video is still an open issue.
Resuming, I need to avoid that the visitor of a web page see the real source of an image streming. So I want to embed the video a some wrapper php page that doesnt use any userid/password but is under my control. Embedding the video stream into any HTML page it's really easy:
<img src="http://5.246.77.89:8090/videostream.cgi?user=stack&pwd=overflow&resolution=32&rate=15" alt="">
For some time I'll give you the opportunity to test the source of the video streaming that I want to hide here
http://93.58.198.189:8090/videostream.cgi?user=stack&pwd=overflow&resolution=32&rate=15
Now all I need is a simple web page let say video.php that is able to stream the video without asking credentials and hiding the original source IP, something like
<img src='my.php'>
How can I obtain this behavior?
Note that despite the source is a video stream, the header is image/jpeg as you can see by yourself and it works with any browser. I've tried to use
<?php
header("content-type:image/jpeg");
passthru("http://93.58.198.189:8090/videostream.cgi?user=stack&pwd=overflow&resolution=32&rate=15");
?>
but for some reason doesn't work. Any idea?
Good question, i was also had a same problem.
Now its solved for me. just you can go to you tube video url where your video is stored and below the video there is share ad embed, you go to embed and there you will get a url which can be embeded to your video.php. it works.

Crawl embeded Flash video and render Javascript to obtain final GUI

Now, I am encountering some difficulties when I have to scan or crawl a video URL link. This web page is using the Flash-based technology to embed the video and stream video.
In order to understand more clearly, this is a link example:
http://vnexpress.net/gl/the-gioi/tu-lieu/2012/11/bai-phat-bieu-thua-nhan-that-bai-cua-romney/
The above link has below content (HTML code for Flash embedded video):
<div id="flashContent" style="text-align:center;width:100%;">
<span id="FlashPlayer79237" class="Normal" align="center">Bạn cần cài Flash Player để xem được Clip này.</span>
</div>
In this above article, there is a above video. However, when I tried to scan or crawl the content, the video could not run properly (because it could not load correct video link) and only show Install Flash Player plugin words (Certainly, the real web page needs to run some Javascript script or Flash script to obtain the real video link and stream this video for users)
Therefore, how can I render Flash and Javascript script through PHP or ASP.NET or Java? How can I get the correct video link when I crawl the web page? In this case, how can I obtain the correct Flash embedded video (HTML code)?
Thank you so much.
Before I answer, I want to make a note that if you need this information to do anything shady... please don't.
Disclaimer aside, for that particular site it is relatively easy.
The flashvars param (which is probably put there by Javascript) contains a value called xmlPath, which is a url encoded path (relative to their domain name). If you grab that and decode it, you get something like:
/Service/FlashVideo/PlayListVideoPage.asp?id=79237&f=108&t=1
which points to
http://vnexpress.net/Service/FlashVideo/PlayListVideoPage.asp?id=79237&f=108&t=1
If you read that, it's an XML file which contains the URL of the actual video.
I'm not quite sure where that value is generated from. If you needed to do this fully server-side, you could use a headless browser to process it.

Capturing the image view count on click while using jquery fancybox

does anyone have an idea on how I could capture the image id when a user clicks the next / previous button in Fancybox? I like how Fancybox changes depending on the size of the image so I prefer to use this over some of the other galleries that I have seen. Has anyone successfully done this? The site is in PHP.
The general idea would be to "proxy" your images by a PHP script.
This script would:
add 1 to the view count of the image
serves the image to the browser (instead of serving an HTML page as usual)
You would then update the src attribute of your pictures img tag :
<img src="mypicture.png"/>
would become
<img src="view_picture.php?picture=1"/>
Note that you must be careful and not authorize a filename in the picture parameter and/or carrefully check that the user is not trying to see a file that you don't want to show him (think view_picture.php?picture=../.htpasswd )
Consider using a general website analytics software, like Piwik. This will give you additional insights on you visitors and their actions on your site, rather than a simple image view counter.
I am running a site that uses Fancybox and Piwik, all image views through Fancybox will automatically show up in the Downloads section of Piwik reports without any additional configuration.
But you could easily customize this through Fancybox's onComplete callback and Piwik's trackPageView(). See Piwik Javascript API and Fancybox API for details.

sending information from scripting side to flash video player

I don't know how to ask this, but the thing is that i was thinking that how does youtube or videofy.me like video blogs send the video path & all info to a flash video player i mean when e click on any video link how does it sets up everything and displays the chosen video, because actually i've created one but in that i had to set up the whole page via flash so that it can manipulate the information like path & name of the video, and cannot use html links, php and all.. so can u people tell me how do i start up & how this process is done & what i need to do & other important things on this.. i mean sending any info to a flash player via any scripting or server side language. Thank you..
There are several ways:
you can "hijack" clicks on links via JavaScript and JavaScript can communicate with flash (e.g. via ExternalInterface)
or you can change/add hash to the current page and Flash can be listening to such changes - this is how you could implement also flash deep linking for example
another option would be use javascript to remove the old video element from the page, and inject a new video (flash) element with the correct flashVars so the chosen video will play ...

Categories