Don't download mp3 on page load - jplayer - jplayer

I am using jplayer and it loads all mp3 files on page load. Its not only slowing down page loading but also eating up bandwidth. Is there a way that jplayer downloads and play mp3 after user clicks play button. OR do I have to use a player that will stream audio files.

There is a preload option in jPlayer:
The jPlayer constructor option jPlayer({preload}) is used to control
when jPlayer begins downloading new media. Some browsers will begin
the download for the whole media when the preload option is "metadata".
Others will require that "auto" is used. The only way to ensure
download does not begin automatically is to use the preload option "none".
Remember that, the media may not download as it depends on the browser
you are using. Mobile browser such as Mobile Safari on iOS 4.2 require
a gesture before any media is downloaded or played. ie., The user must
press a button to initiate the load or play operations the 1st time.
jPlayer-option-preload
Alternatively you can leave the player without mp3 for initial page load and only add it when the user clicks play. See this demo for an example of loading media to the player: http://jplayer.org/latest/demo-02-jPlayerPlaylist/

Related

Download button for HTML5 Audio

How do I get the download button to show on HTML5 audio?
I have seen many articles explaining how to hide the download button. But in my case, I need to show the button.
It's not intended for you to have control over the presentation of the controls of the built-in media player.
While browsers do provide some things you can manipulate via CSS, this isn't really the best way.
If you want to ensure that a download button is present, you need to implement it yourself.
<a href="/path/to/media/file.webm" download>Download</a>

If <video> is specified with a remote url, and the user plays the file, does the file get streamed or downloaded?

If I launch a web page using UIWebView and that page contains a tag with a url specifying a remote video file, then when the user clicks the video to watch it what happens?
Does the web engine stream the video, or download it somewhere, if it downloads it then as its playing within my app is it placed in my app's sandbox?
UIWebView is just creating a Safari browser component, so it should have the same behaviour as it.
The tag in HTML5 for Safari has suport for MP4 format for video, and AAC or MP3 for audio. It will be streamed by means of HTTP Live Streaming and (only in iOS) Adaptive Streaming. I belive that will be done within Safari's sandbox.

How can I use a UIWebview to load content from a asp.net website dynamically loading .mp4 video and get the video to play?

I have a client that has a website. The website current allows users to login and search for and play .mp4 video. The list of playlist is created dynamically where values are stored in a sql server 2008 database. My client's site is already built for smartphone utilization and did not want to recreate an iphone app. Besides it would mean loading thousands of video. Instead I thought I would use the UIWebview to load the website. This seemed to work well. However, when you try to click on and play video within the UIWebview nothing happens. This is not the case if we launch the mobile website within the apple mobile safari browser. The vide plays by kicking off in the iPhone video player. Is there any way to accomplish this same functionality with a uiwebview? Any guidance or help is appreciated.
UIWebView will play video using <video> if everything is set up correctly, either remote files or local files will work (if they are the correct format).
What does your video tag look like? In particular your src.
If you want to, for example, play an inline video the html5 for that would be something like
<video id="theVideo" controls width="280" height="160" src="yourVideo.mp4" webkit-playsinline></video>
And it would be necessary in the UIWebView to set this line
self.webView.allowsInlineMediaPlayback = YES;
Or you can also explicitly load the media player, but doing everything in HTML5 is neat and tidy and easy.

Easiest way to sound of an audio file for notification purposes on a website?

It has to work on IE8 and above, and the rest of the modern browsers (Firefox, Chrome, Opera).
Related question:
How to play a notification sound on websites?
I've tried using the Yahoo! Media Player, but it refuses to pick up on my .mp3 links despite them looking like:
<a id="wolf-blue" href="/Public/audio/wolf.mp3">a</a>
Assuming I have a .mp3 file and I want to play it when a timer reaches 0, what do you suggest I use to play this sound file? I do not want to show my users any sort of player UI, just play the sound.
You'll want to check out jPlayer. It's an HTML5 Audio player that has fallback to Flash for browsers that don't support HTML5.
You can use CSS to completely customize the player, including hiding it from view.

Is there HTML embeddable audio player which prevents downloading of the audio it plays?

I'm looking for an audio player (like jplayer) which can be embedded in a HTML page which will allow MP3's to be played but not downloaded.
The problem: Flash players request the audio file from the server so the URL of the MP3 is present in the HTML source and can be copy/pasted in to the address bar to download the track. This will inherently be the problem with most players.
Possible solution: The player accepts some "encrypted" (non-playable) format which is then decoded inside the player. Anything like this exist?
I am not looking for solutions which sound like:
Obfuscating the URL of the MP3
Preventing downloading of the MP3 from third party sites (eg. forums) using .htaccess
Embedding the mp3 inside a flash movie unless this can be automated, since mp3's are uploaded on a regular basis.
Having a URL which only works for a certain period of time
I don't know if this answers your question, but... Have you tried streaming your audio files via flash? I have never heard of someone being able to download a file which was dynamicly called through actionscript... but maybe i just don't know what i am talking about...

Resources