Skip to content

Commit 79dfc2c

Browse files
committed
Third commit adding build folder
I want to show build folder, for people who could use the build directly.
1 parent 7dad8e0 commit 79dfc2c

38 files changed

+989
-0
lines changed

build/web/customEventIE.js

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
try{new CustomEvent('?')}catch(o_O){
2+
/*!(C) Andrea Giammarchi -- WTFPL License*/
3+
this.CustomEvent = function(
4+
eventName,
5+
defaultInitDict
6+
){
7+
8+
// the infamous substitute
9+
function CustomEvent(type, eventInitDict) {
10+
var event = document.createEvent(eventName);
11+
if (type != null) {
12+
initCustomEvent.call(
13+
event,
14+
type,
15+
(eventInitDict || (
16+
// if falsy we can just use defaults
17+
eventInitDict = defaultInitDict
18+
)).bubbles,
19+
eventInitDict.cancelable,
20+
eventInitDict.detail
21+
);
22+
} else {
23+
// no need to put the expando property otherwise
24+
// since an event cannot be initialized twice
25+
// previous case is the most common one anyway
26+
// but if we end up here ... there it goes
27+
event.initCustomEvent = initCustomEvent;
28+
}
29+
return event;
30+
}
31+
32+
// borrowed or attached at runtime
33+
function initCustomEvent(
34+
type, bubbles, cancelable, detail
35+
) {
36+
this['init' + eventName](type, bubbles, cancelable, detail);
37+
'detail' in this || (this.detail = detail);
38+
}
39+
40+
// that's it
41+
return CustomEvent;
42+
}(
43+
// is this IE9 or IE10 ?
44+
// where CustomEvent is there
45+
// but not usable as construtor ?
46+
this.CustomEvent ?
47+
// use the CustomEvent interface in such case
48+
'CustomEvent' : 'Event',
49+
// otherwise the common compatible one
50+
{
51+
bubbles: false,
52+
cancelable: false,
53+
detail: null
54+
}
55+
);
56+
}

build/web/images/mylogo.png

950 Bytes
Loading

build/web/index.html

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html><!--
2+
Copyright (c) 2016, <your name>. All rights reserved. Use of this source code
3+
is governed by a BSD-style license that can be found in the LICENSE file.
4+
--><html><head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta name="scaffolded-by" content="https://github.com/google/stagehand">
9+
<title>jwplayerController</title>
10+
<link rel="stylesheet" href="styles.css">
11+
12+
<script src="customEventIE.js"></script>
13+
<script src="jwplayer/jwplayer.js"></script>
14+
<script src="jwplayerInterface.js"></script>
15+
<script>jwplayer.key="yourkey";</script>
16+
<script defer="" src="main.dart.js"></script>
17+
18+
</head>
19+
20+
<body>
21+
22+
<div id="containingVideoBlock">
23+
<div id="videoWrapper">
24+
<div id="wrapper">
25+
<div id="thePlayer">Loading the player...</div>
26+
<div id="interactions" class="hide">
27+
<p id="nextText">Next ?</p>
28+
<button id="sampleButtonA">Choix A</button>
29+
<button id="sampleButtonB">Choix B</button>
30+
<button id="sampleButtonC">Choix C</button>
31+
</div>
32+
</div>
33+
</div>
34+
</div>
35+
36+
37+
38+
</body></html>

build/web/jwplayer/README.html

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>README: JW Player</title>
5+
<style>
6+
body { padding: 50px 100px; width: 700px; font: 13px/20px Arial; background: #FFF; }
7+
a, h1, h2 { color: #369; }
8+
h2 { margin-top: 50px; }
9+
pre { font-size: 12px; background:#E5F3C8; padding:5px 10px; border: 1px solid #D3EAA4; }
10+
dt { font-weight: bold; }
11+
</style>
12+
</head><body>
13+
14+
<h1>README: JW Player</h1>
15+
16+
<p>Thank you for downloading JW Player 6, the world's most popular HTML5/Flash video player! See <a href="http://www.longtailvideo.com/support/jw-player/28832/about-jw-player">About JW Player</a> for an overview of supported browsers/devices, as well as a more detailed feature list. See the <a href="http://www.longtailvideo.com/support/jw-player/28835/release-notes">Release Notes</a> if you want to learn what changed with this latest release.</p>
17+
18+
<h2>Quick Start</h2>
19+
20+
<p>Copy the <strong>jwplayer</strong> folder that contains this README to the www root of your website. Next, include the <em>jwplayer.js</em> script in the &lt;head&gt; of your HTML page.</p>
21+
22+
<p>If you have purchased the <a href="http://www.longtailvideo.com/jw-player/pricing/">Pro, Premium or Ads edition</a> of JW Player, its features can be activated by inserting your server-less JW Player license key in the second line:</p>
23+
24+
<pre>
25+
&lt;script type="text/javascript" src="/jwplayer/jwplayer.js"&gt;&lt;/script&gt;
26+
&lt;script type="text/javascript"&gt;jwplayer.key="ABCDEFGHIJKLMOPQ";&lt;/script&gt;
27+
</pre>
28+
29+
<p>Note: A key is not required to use the Free edition, but will still be available from your <a href="https://account.longtailvideo.com/">JW Player Account</a>. Including your key will enable the free <a href="http://www.longtailvideo.com/support/jw-player/28852/using-jw-player-analytics">JW Player Analytics</a> for your account.</p>
30+
31+
<h3>Embed Code</h3>
32+
33+
<p>When the script and key are set, scroll down to the &lt;body&gt; of your HTML page and insert the JW Player embed code at the place you want your video to appear:</p>
34+
35+
<pre>
36+
&lt;div id="myElement"&gt;Loading the player...&lt;/div&gt;
37+
38+
&lt;script type="text/javascript"&gt;
39+
jwplayer("myElement").setup({
40+
file: "/uploads/myVideo.mp4",
41+
image: "/uploads/myPoster.jpg"
42+
});
43+
&lt;/script&gt;
44+
</pre>
45+
46+
<p>See <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player">Embedding JW Player</a> for a more elaborate description of options and some example embeds.</p>
47+
48+
<p><em>Note two very common issues prevent smooth video playback in Internet Explorer 9/10. First, you need to set <strong>&lt;!DOCTYPE html&gt;</strong> to prevent triggering IE's compatibility mode. Second, your videos must be served with the <strong>video/mp4</strong> mimetype. Not doing so will cause IE not to play them. See our <a href="http://www.longtailvideo.com/support/jw-player/28840/troubleshooting-your-setup">troubleshooting guide</a> for more common issues.</em></p>
49+
50+
<h3>Premium Skins</h3>
51+
52+
<p>If you have purchased the Premium or Ads edition of the player, your player includes a set of Premium skins. These skins can be downloaded from your <a href="https://account.longtailvideo.com/">JW Player Account</a>, but you can also load them off our CDN by simply inserting the skin name:</p>
53+
<pre> skin: "bekle"</pre>
54+
55+
<p>See <a href="http://www.longtailvideo.com/support/jw-player/28846/using-jw-player-skins">Using JW Player Skins</a> for more info.</p>
56+
57+
58+
59+
<h2>Documentation</h2>
60+
61+
<p>If you need help, the LongTail Support Community contains a wealth of information, including guides on:</p>
62+
63+
<ul>
64+
<li>Supported <a href="http://www.longtailvideo.com/support/jw-player/28836/media-format-support">Media Formats</a> and <a href="http://www.longtailvideo.com/support/jw-player/28837/browser-device-support">Browsers &amp; Devices</a>.</li>
65+
<li> How to <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player">Customize</a> and <a href="http://www.longtailvideo.com/support/jw-player/28840/troubleshooting-your-setup">Troubleshoot</a> your embeds.</li>
66+
<li>Configuring <a href="http://www.longtailvideo.com/support/jw-player/28842/working-with-playlists">Inline Playlists</a> or <a href="http://www.longtailvideo.com/support/jw-player/28843/loading-rss-feeds">RSS Feeds</a> (with multiple formats/qualities).</li>
67+
<li>The <a href="http://www.longtailvideo.com/support/jw-player/28846/using-jw-player-skins">PNG Skinning Model</a> and <a href="http://www.longtailvideo.com/support/jw-player/28850/using-the-javascript-api">JavaScript API</a>.</li>
68+
<li>Using <a href="http://www.longtailvideo.com/support/jw-player/28854/using-rtmp-streaming">RTMP Streaming</a> and <a href="http://www.longtailvideo.com/support/jw-player/28856/using-apple-hls-streaming/">Apple HLS</a> (Premium/Ads edition only).</li>
69+
<li>How to <a href="http://www.longtailvideo.com/support/jw-player/28862/configuring-video-ads">Configure Video Ads</a> (Ads edition only).</li>
70+
</ul>
71+
72+
<p>Visit our <a href="http://www.longtailvideo.com/support/forums/jw-player/">Support Forums</a> for setup problems, bug reports or suggestions for new features or enhancements. The forums are very active and frequently visited by members of the JW Player development team. Please see your <a href="http://account.longtailvideo.com">JW Player Account</a> for more information on obtaining technical support.</p>
73+
74+
<p>Follow the <a href="http://www.longtailvideo.com/blog/">LongTail Video Blog</a> for news on the JW Player and online video in general. We frequently publish posts on topics such as HTML5, video SEO, H.264, VAST advertising, etc. You can also <a href="http://twitter.com/longtailvideo">follow us on Twitter</a> or <a href="http://www.facebook.com/longtailvideo">like us on Facebook</a> to stay connected.</p>
75+
76+
77+
78+
<h2>Licensing</h2>
79+
80+
<p>Please be aware that each player edition has its own license:</p>
81+
82+
<dl>
83+
<dt>JW Player Free</dt>
84+
<dd>Under the terms of our <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons license</a>, you can use, modify and redistribute the player for non-commercial purposes only.
85+
Commercial sites must <a href=" http://www.longtailvideo.com/jw-player/pricing/">purchase a license</a> for the <strong>Pro</strong>, <strong>Premium</strong> or <strong>Ads</strong> editions. See the <a href="http://www.longtailvideo.com/jw-player/license/jw-player-license-text">JW Player 6 License</a> for further details.</dd>
86+
<dt>JW Player Pro</dt>
87+
<dd>
88+
Under the terms of our <a href="http://www.longtailvideo.com/jw-player/license/jw-player-license-text">Commercial License</a>, you can deploy your copy of JW Player <strong>Pro</strong> for commercial use on 1 domain. See our <a href="http://www.longtailvideo.com/jw-player/pricing/">pricing page</a> for more information on edition features and pricing.
89+
</dd>
90+
<dt>JW Player Premium</dt>
91+
<dd>
92+
Under the terms of our <a href="http://www.longtailvideo.com/jw-player/license/jw-player-license-text">Commercial License</a>, you can deploy your copy of JW Player <strong>Premium</strong> for commercial use on up to 10 domains. See our <a href="http://www.longtailvideo.com/jw-player/pricing/">pricing page</a> for more information on edition features and pricing.
93+
</dd>
94+
<dt>JW Player Ads</dt>
95+
<dd>
96+
Under the terms of our <a href="http://www.longtailvideo.com/jw-player/license/jw-player-license-text">Commercial License</a>, you can deploy your copy of JW Player <strong>Ads</strong> for commercial use on up to 10 domains, with an additional restriction of up to 250.000 filled ad impressions per month. See our <a href="http://www.longtailvideo.com/jw-player/pricing/">pricing page</a> for more information on edition features and price.</dd>
97+
</dl>
98+
99+
<p>Examples of <strong>commercial use</strong> includes websites with any advertisements, websites owned or operated by businesses, websites designed to promote products or services, and tools (e.g. a CMS) that bundle JW Player in their offering.</p>
100+
101+
<p>Note all editions of JW Player incorporate the <a href="http://www.movable-type.co.uk/scripts/tea-block.html">Block TEA library</a> from Movable Type (CC-BY license).</p>
102+
103+
<p>The player also makes use of the <a href="http://underscorejs.org/">Underscore.js</a> library, which is distributed under the following terms:</p>
104+
105+
<pre>Copyright (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative
106+
Reporters & Editors
107+
108+
Permission is hereby granted, free of charge, to any person
109+
obtaining a copy of this software and associated documentation
110+
files (the "Software"), to deal in the Software without
111+
restriction, including without limitation the rights to use,
112+
copy, modify, merge, publish, distribute, sublicense, and/or sell
113+
copies of the Software, and to permit persons to whom the
114+
Software is furnished to do so, subject to the following
115+
conditions:
116+
117+
The above copyright notice and this permission notice shall be
118+
included in all copies or substantial portions of the Software.
119+
120+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
121+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
122+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
123+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
124+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
125+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
126+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
127+
OTHER DEALINGS IN THE SOFTWARE.
128+
</pre>
129+
130+
</body>
131+
</html>

build/web/jwplayerInterface.js

+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
window.addEventListener('complexAction', eventHandlerComplexAction, false);
2+
window.addEventListener('setupAction', eventHandlerSetup, false);
3+
4+
function eventHandlerSetup(e) {
5+
//alert('detail: ' + e.detail.imageFileIn + ' ' + e.detail.videoFile + ' ' + e.detail.imageFileOut);
6+
//repéré un problème avec CustomEvent dans Dart qui est sérialisé, il faut ensuite le désérialiser (dart 1.15)
7+
var s = e.detail.toString();
8+
var d = JSON.parse(s);
9+
//console.log(d.imageFileIn + " " + d.videoFile + " " + d.imageFileOut);
10+
11+
JwplayerControl.init(d.imageFileIn, d.videoFile, d.imageFileOut);
12+
JwplayerControl.setup();
13+
}
14+
15+
function eventHandlerComplexAction(e) {
16+
//alert('detail: ' + e.detail.imageFileIn + ' ' + e.detail.videoFile + ' ' + e.detail.imageFileOut);
17+
//repéré un problème avec CustomEvent dans Dart qui est sérialisé, il faut ensuite le désérialiser (dart 1.15)
18+
var s = e.detail.toString();
19+
var d = JSON.parse(s);
20+
21+
JwplayerControl.init(d.imageFileIn, d.videoFile, d.imageFileOut);
22+
if (d.autostart == "false")
23+
{
24+
var mode = JwplayerControl.getMode();
25+
if (mode == "flash")
26+
{
27+
JwplayerControl.load();
28+
} else {
29+
JwplayerControl.unset();
30+
JwplayerControl.setup();
31+
}
32+
}
33+
else {
34+
35+
JwplayerControl.loadandplay();
36+
}
37+
var theEle = document.getElementById('interactions');
38+
theEle.className = 'hide';
39+
}
40+
41+
/* ---------------------- */
42+
43+
44+
45+
/* -------------------------- */
46+
47+
var JwplayerControl = function () {
48+
49+
var imageFileIn = "";
50+
var videoFile = "";
51+
var imageFileOut = "";
52+
var autostart = "";
53+
var mode = "";
54+
var mediaFolder = "";
55+
56+
57+
58+
function complete() {
59+
//alert("complete");
60+
autostart = "false";
61+
jwplayer("thePlayer").load([{
62+
image: imageFileOut,
63+
sources: [{
64+
file: videoFile
65+
}]
66+
}]);
67+
window.dispatchEvent(new CustomEvent("videoComplete", {"detail":{"ended":true}}));
68+
}
69+
70+
function playlistLoaded() {
71+
//alert("playlist: " + autostart);
72+
//if (autostart == "false") jwplayer("thePlayer").stop();
73+
//var state = jwplayer("thePlayer").getState();
74+
//alert("playlistLoaded state: " + state);
75+
//if (autostart != "true") jwplayer("thePlayer").pause(true);
76+
//if (autostart == "false") jwplayer("thePlayer").pause(true);
77+
}
78+
79+
return {
80+
81+
init: function(i, v, o) {
82+
mediaFolder = "medias/";
83+
imageFileIn = mediaFolder+i;
84+
videoFile = mediaFolder+v;
85+
imageFileOut = mediaFolder+o;
86+
},
87+
88+
setup: function() {
89+
var playerInstance = jwplayer("thePlayer");
90+
playerInstance.setup({
91+
playlist: [{
92+
image: imageFileIn,
93+
sources: [{
94+
file: videoFile
95+
}]
96+
}],
97+
height: "100%",
98+
primary: "html5",
99+
width: "100%",
100+
analytics: {
101+
enabled: false
102+
},
103+
events:{
104+
onComplete: function() {
105+
complete();
106+
},
107+
onPlaylist: function() {
108+
playlistLoaded();
109+
}
110+
},
111+
skin: "skins/sixalt.xml",
112+
logo: {
113+
hide: false,
114+
file: "images/mylogo.png"
115+
}
116+
});
117+
},
118+
119+
unset: function() {
120+
var playerInstance = jwplayer("thePlayer");
121+
playerInstance.remove();
122+
},
123+
124+
load: function() {
125+
autostart = "false";
126+
var playerInstance = jwplayer("thePlayer");
127+
playerInstance.load([{
128+
image: imageFileIn,
129+
sources: [{
130+
file: videoFile
131+
}]
132+
}]);
133+
//jwplayer("thePlayer").play();
134+
},
135+
136+
loadandplay: function() {
137+
autostart = "true";
138+
var playerInstance = jwplayer("thePlayer");
139+
playerInstance.load([{
140+
image: imageFileIn,
141+
sources: [{
142+
file: videoFile
143+
}]
144+
}]);
145+
playerInstance.play();
146+
},
147+
148+
play: function() {
149+
var playerInstance = jwplayer("thePlayer");
150+
playerInstance.play();
151+
},
152+
153+
getMode: function() {
154+
var playerInstance = jwplayer("thePlayer");
155+
mode = playerInstance.getRenderingMode();
156+
return mode;
157+
}
158+
};
159+
160+
}();

build/web/medias/twoCircles01.ogg

580 KB
Binary file not shown.

build/web/medias/twoCircles01a.jpg

7.37 KB
Loading

build/web/medias/twoCircles01b.jpg

11.2 KB
Loading

build/web/medias/twoCircles02.ogg

731 KB
Binary file not shown.

build/web/medias/twoCircles02a.jpg

11.1 KB
Loading

build/web/medias/twoCircles02b.jpg

11.2 KB
Loading

build/web/medias/twoCircles03.ogg

940 KB
Binary file not shown.

build/web/medias/twoCircles03a.jpg

11.2 KB
Loading

build/web/medias/twoCircles03b.jpg

11.2 KB
Loading

build/web/medias/twoCircles04.ogg

546 KB
Binary file not shown.

build/web/medias/twoCircles04a.jpg

11.2 KB
Loading

build/web/medias/twoCircles04b.jpg

7.62 KB
Loading

build/web/medias/twoCircles05.ogg

438 KB
Binary file not shown.

build/web/medias/twoCircles05a.jpg

11.2 KB
Loading

build/web/medias/twoCircles05b.jpg

7.49 KB
Loading

build/web/medias/twoCircles06.ogg

815 KB
Binary file not shown.

build/web/medias/twoCircles06a.jpg

7.58 KB
Loading

build/web/medias/twoCircles06b.jpg

7.5 KB
Loading

build/web/medias/twoCircles07.ogg

1.05 MB
Binary file not shown.

build/web/medias/twoCircles07a.jpg

7.62 KB
Loading

build/web/medias/twoCircles07b.jpg

7.49 KB
Loading

build/web/medias/twoCircles08.ogg

445 KB
Binary file not shown.

build/web/medias/twoCircles08a.jpg

7.49 KB
Loading

build/web/medias/twoCircles08b.jpg

2.89 KB
Loading

build/web/medias/twoCircles09.ogg

884 KB
Binary file not shown.

build/web/medias/twoCircles09a.jpg

7.67 KB
Loading

build/web/medias/twoCircles09b.jpg

7.38 KB
Loading

build/web/medias/twoCircles10.ogg

529 KB
Binary file not shown.

build/web/medias/twoCircles10a.jpg

7.37 KB
Loading

build/web/medias/twoCircles10b.jpg

7.49 KB
Loading

0 commit comments

Comments
 (0)