Hola Media Player API
An embeddable HTML/JS widget for sites to instantly stream torrents and magnets to the browser.
<script src="//hola.org/play_page.js"></script>
<div class="hola-embedded-player"
v="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4.torrent">
</div>
Features
- instant streaming
- protocols: torrent urls and magnet links
- embeddable as script and div, iframe or simple link to video
- video formats: mp4, mkv, avi, wmv, divx, xvid, asf, asx, flv, m2v, m4p, m4v, mov, mpe, mpeg, mpg, mpg4, ogg, ogv, vob, webm, wvx
- browsers: Chrome, Firefox, IE, Opera
- operating systems: Windows XP and above, Android. Mac OS (coming soon)
- subtitles: srt, vtt, and zip packaging
- posters
- seek/reposition
- no Hola watermark during video playing
Use of the Hola Player is subject to Hola Player terms of use
<a> link
<a href="http://hola.org/play#v=http%3A%2F%2Fdistribution.bbb3d.renderfarming.net%2Fvideo%2Fmp4%2Fbbb_sunflower_1080p_30fps_normal.mp4.torrent">
Watch SunFlower Movie
</a>
<script> and <div>
<script src="//hola.org/play_page.js"></script>
<div class="hola-embedded-player"
v="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4.torrent">
</div>
<iframe>
<iframe width="770" height="500" frameborder="0" allowfullscreen
src="//hola.org/play_embed#v=http%3A%2F%2Fdistribution.bbb3d.renderfarming.net%2Fvideo%2Fmp4%2Fbbb_sunflower_1080p_30fps_normal.mp4.torrent">
</iframe>
Make all torrent and magnet links pop up a media player upon hover
<script src="//hola.org/play_page.js"></script>
<script>window.hola_player.init({links: 'hover'});</script>
API parameters
parameters formatting
- url (link or iframe src):
http://hola.org/play#v=...¶m1=...¶m2=...¶m3=...
(all params values must be uri-encoded) - div parameters:
<div class="hola-embedded-player" v="..." param1="..." param2="..." param3="...">
v=VIDEO_SOURCE
v=http://../clip.mp4.torrent
- torrent that holds mp4/mkv/avi video
Live demov=magnet:...
- magnet link that holds mp4/mkv/avi video
Live demo
title=VIDEO_TITLE
title="Video Title"
- set the video title. if not specified, auto-detect video title (from file name, torrent info)
Live demo
poster=POSTER_URL
poster=http://../poster.png
- url for the video poster image
Live demo
autoplay=0|1 (coming soon)
autoplay=0
- default, don't auto start playing the videoautoplay=1
- auto start playing the video
start=START_SEC
start=100
- start playing video 100 sec after video start
Live demostart=00:01:40
- start at 1 minute and 40 seconds (which is 100 seconds). Also possible 1:40 or 01:40
Live demo
duration=DURATION_SEC (coming soon)
duration=3600
- set the video duration to be used before the video information is retrievedduration=01:00:00
- duration to 1 hour (which is 3600 seconds). Also possible 1:00:00
video_tag=0|1
video_tag=0
- open hola browser with VLC engine to play videos
Live demovideo_tag=1
- default, in supporting browsers try playing MP4 videos in same browser using browser's<video>
tag
Live demo
sub=LANGUAGE_CODE,ENCODING,URL
- srt subtitles from http source:
sub=en,utf-8,http://../clip_subtitles.srt
Live demo - srt inside zip:
sub=en,utf-8,http://../clip_subtitles.zip
Live demo - multiple subtitles:
sub1=en,utf-8,http://../clip_en.srt&sub2=fr,utf-8,http://.../clip_fr.srt&sub3=es,utf-8,http://.../clip_es.srt
Live demo - subtitles json:
sub=json,http://../clip_subtitles.json
Live demo and JSON example - force subtitles encoding:
sub=en,utf-8,http://.../clip.srt
orsub=es,latin-1,http://.../clip.srt
.
Live demo
Language codes: ISO 639-2 language code table. Examples: en
, en-US
, pt-BR
Encoding: file encoding table.
Examples: utf-8
, cp1251
Supported formats: srt
, vtt
, and zip
packaging.
Set server returning srt
/vtt
/zip
/json
file to include Access-Control-Allow-Origin: *
in HTTP response headers.
sub_default=on|off|URL
sub_default=on
- default, automatic selection of subtitles (use previous user selection, default to browser locale). Live demosub_default=off
- subtitles off. User needs to enable them
Live demosub_default=en
- explicit subtitle language.
If there are multiple subtitles in this language, the first one will be selected.
Live demosub_default=http://.../clip.srt
- select a specific subtitles by default.
The URL needs to be the same URL previously provided tosub=...
.
Live demo
sub_transparent=0|1
sub_transparent=0
- subtitles with black background.
Live demosub_transparent=1
- default, subtitles with transparent background (only supported on<video>
tag).
Live demo
When playing video with Hola Browser, which uses VLC rendering engine, this setting is has no effect: it is always sub_transparent=0
,
due to technical limitations of VLC module.
file_select=NUMBER
- default - the largest file in the torrent is selected for playing.
file_select=3
- select the 4th file (NUMBER
is 0 based index)
Live demo
Reporting bugs
How to report an issue/bug with Hola Media Player:
- In order to narrow the scope of the bug, please reproduce it with one of our above JSBin live samples.
- If it does not reproduce in any of the samples, modify the relevant sample in JSBin, in a way that reproduces the problem you have.
- Open an issue and include in it the link to JSBin that reproduces the problem, with an explanation of how to reproduce it, along with the exact browser version.
This will give us a systematic reproduction and will allow us to debug and solve the bug faster.
Feel free to also open issues with suggestions for improvement, or feature requests!
Known open issues
WIN10 - MP4 opens in Hola Browser.
Solved: 26-Aug-2015junk messages in developer consoleGET chrome-extension://.../icon.png net::ERR_FAILED
.
Solved: 1-Sep-2015Subtitles default size too small.
Solved: 1-Sep-2015Choosing subtitles does not display the selected language issue #20.
Solved: 27-Sep-2015Setting Subtitles does not working issue #25.
Solved: 7-Oct-2015Implementsub_transparent=1
support when using<video>
tag.
Solved: 7-Oct-2015The player don't load the subtitles with appropriated encoding Issue #5.
Solved: 12-Oct-2015file_select=...
- Ability to select which file in the torrent to use Issue #2.
Solved: 20-Oct-2015Embedding inside https pages redirects to http player. Allow playing embedded inside https pages Issue #19.
Solved: 5-Nov-2015- MKV: Cannot disable subtitles embedded into MKV files.
Target fix date: 13-Mar-2016 - Embed not correctly work in Android. Download the exe file instead hola application Issue #22.
Target fix date: 15-Mar-2016 - MKV: Select an audio track in a dual audio mkv Issue #2.
Target fix date: 15-Mar-2016 - Android: Subtitles for Android [Issue #17] (hola#17).
Target fix date: 25-Mar-2016 - Firefox and Hola Browser: in full screen, some videos have blue artifacts at the top part of the screen.
Target fix date: 29-Mar-2016