shaka-player 3.3.7 → 3.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/CONTRIBUTORS +2 -0
- package/README.md +20 -6
- package/demo/index.html +0 -2
- package/dist/controls.css +1 -1
- package/dist/deps.js +2 -2
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +11 -0
- package/dist/shaka-player.compiled.debug.d.ts +11 -0
- package/dist/shaka-player.compiled.debug.externs.js +48 -37
- package/dist/shaka-player.compiled.debug.js +31 -26
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +48 -37
- package/dist/shaka-player.compiled.js +761 -760
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +11 -0
- package/dist/shaka-player.ui.debug.d.ts +11 -0
- package/dist/shaka-player.ui.debug.externs.js +48 -37
- package/dist/shaka-player.ui.debug.js +33 -28
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +48 -37
- package/dist/shaka-player.ui.js +876 -875
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/welcome.md +6 -3
- package/lib/dash/dash_parser.js +5 -0
- package/lib/hls/hls_parser.js +6 -2
- package/lib/media/presentation_timeline.js +24 -1
- package/lib/player.js +1 -1
- package/lib/polyfill/media_capabilities.js +1 -0
- package/lib/polyfill/videoplaybackquality.js +3 -1
- package/lib/util/platform.js +41 -1
- package/lib/util/string_utils.js +56 -14
- package/maintained-branches.md +15 -0
- package/package.json +2 -4
- package/app-engine/README.md +0 -9
- package/app-engine/demo-version-index/README.md +0 -14
- package/app-engine/demo-version-index/app.yaml +0 -2
- package/app-engine/demo-version-index/main.py +0 -162
- package/app-engine/demo-version-index/requirements.txt +0 -6
- package/app-engine/demo-version-index/templates/index.html +0 -114
- package/app-engine/shaka-player-demo/README.md +0 -18
- package/app-engine/shaka-player-demo/app.yaml +0 -61
- package/app-engine/shaka-player-demo/main.py +0 -95
- package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
- package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
- package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
- package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
- package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
- package/app-engine/shaka-player-demo/posters/standard.png +0 -0
- package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
- package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
- package/app-engine/shaka-player-demo/posters.py +0 -110
- package/app-engine/shaka-player-demo/requirements.txt +0 -5
- package/app-engine/shaka-player-demo/time.txt +0 -1
- package/build/README.md +0 -127
- package/build/__init__.py +0 -0
- package/build/all.py +0 -150
- package/build/apps.py +0 -186
- package/build/build.py +0 -392
- package/build/check.py +0 -354
- package/build/checkversion.py +0 -84
- package/build/compiler.py +0 -513
- package/build/conformance.textproto +0 -335
- package/build/docker/Dockerfile +0 -20
- package/build/docker/docker-compose.yml +0 -10
- package/build/docs.py +0 -54
- package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
- package/build/eslint-plugin-shaka-rules/index.js +0 -24
- package/build/eslint-plugin-shaka-rules/package.json +0 -7
- package/build/eslint-plugin-shaka-rules/private.js +0 -109
- package/build/gendeps.py +0 -71
- package/build/generateExterns.js +0 -867
- package/build/generateLocalizations.py +0 -262
- package/build/generateTsDefs.py +0 -137
- package/build/install-linux-prereqs.sh +0 -136
- package/build/license-header +0 -5
- package/build/misspellings.txt +0 -38
- package/build/pixelsChanged.js +0 -35
- package/build/shaka-lab.yaml +0 -163
- package/build/shakaBuildHelpers.py +0 -356
- package/build/stats.py +0 -816
- package/build/subprocessWindowsPatch.py +0 -103
- package/build/test.py +0 -541
- package/build/types/ads +0 -8
- package/build/types/cast +0 -6
- package/build/types/cea +0 -13
- package/build/types/complete +0 -9
- package/build/types/core +0 -108
- package/build/types/dash +0 -8
- package/build/types/hls +0 -9
- package/build/types/manifests +0 -5
- package/build/types/networking +0 -6
- package/build/types/offline +0 -22
- package/build/types/polyfill +0 -21
- package/build/types/text +0 -11
- package/build/types/ui +0 -39
- package/build/updateScreenshots.py +0 -85
- package/build/wrapper.template.js +0 -52
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Google App Engine Demo
|
|
2
|
-
|
|
3
|
-
This folder contains everything necessary to host our demo on
|
|
4
|
-
https://shaka-player-demo.appspot.com/
|
|
5
|
-
|
|
6
|
-
- app.yaml: App Engine config file. Defines cache expiration and how specific
|
|
7
|
-
URLs are mapped to specific files.
|
|
8
|
-
|
|
9
|
-
- main.py: A catch-all python service to serve any non-static files. This
|
|
10
|
-
handles HTTP redirects for the root path (this is the only way to
|
|
11
|
-
do HTTP redirects in App Engine) and the poster service (which
|
|
12
|
-
returns special poster images on certain days).
|
|
13
|
-
|
|
14
|
-
- requirements.txt: Used by App Engine to install the necessary Python server
|
|
15
|
-
requirements (Flask).
|
|
16
|
-
|
|
17
|
-
- time.txt: A static file used for time sync in the client. Configured with
|
|
18
|
-
special response headers for cross-origin access.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Copyright 2016 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
runtime: python39
|
|
16
|
-
default_expiration: 5m
|
|
17
|
-
|
|
18
|
-
handlers:
|
|
19
|
-
# A static file used for clock sync in the demo app
|
|
20
|
-
- url: /time.txt
|
|
21
|
-
static_files: time.txt
|
|
22
|
-
upload: time.txt
|
|
23
|
-
expiration: 0
|
|
24
|
-
http_headers:
|
|
25
|
-
Access-Control-Allow-Origin: "*"
|
|
26
|
-
Access-Control-Allow-Headers: "If-Modified-Since,Range,Origin"
|
|
27
|
-
Access-Control-Expose-Headers: "Date"
|
|
28
|
-
Access-Control-Max-Age: "2592000"
|
|
29
|
-
|
|
30
|
-
# These used to exist in the repo, but have been generated server-side for many
|
|
31
|
-
# years now.
|
|
32
|
-
- url: /assets/poster.jpg
|
|
33
|
-
script: auto
|
|
34
|
-
- url: /assets/audioOnly.gif
|
|
35
|
-
script: auto
|
|
36
|
-
|
|
37
|
-
# Serve favicon.ico from the demo folder.
|
|
38
|
-
- url: /favicon.ico
|
|
39
|
-
secure: always
|
|
40
|
-
static_files: demo/favicon.ico
|
|
41
|
-
upload: demo/favicon.ico
|
|
42
|
-
|
|
43
|
-
# For these folders, serve their indexes.
|
|
44
|
-
- url: /docs/api/
|
|
45
|
-
secure: always
|
|
46
|
-
static_files: docs/api/index.html
|
|
47
|
-
upload: docs/api/index.html
|
|
48
|
-
- url: /demo/
|
|
49
|
-
secure: always
|
|
50
|
-
static_files: demo/index.html
|
|
51
|
-
upload: demo/index.html
|
|
52
|
-
- url: /demo/
|
|
53
|
-
secure: always
|
|
54
|
-
static_files: demo/index.html
|
|
55
|
-
upload: demo/index.html
|
|
56
|
-
|
|
57
|
-
# Serve everything else directly.
|
|
58
|
-
- url: /(.+)
|
|
59
|
-
secure: always
|
|
60
|
-
static_files: \1
|
|
61
|
-
upload: .+
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# Shaka Player Demo - Appspot Entrypoint
|
|
2
|
-
# Copyright 2022 Google LLC
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
|
|
5
|
-
# Most of the app is served as static content. Any exceptions go here.
|
|
6
|
-
|
|
7
|
-
import datetime
|
|
8
|
-
import os
|
|
9
|
-
|
|
10
|
-
from flask import Flask, make_response, redirect, request, send_file
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
app = Flask(__name__)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# Redirect root requests to /demo.
|
|
17
|
-
@app.route('/')
|
|
18
|
-
def root():
|
|
19
|
-
return redirect('/demo/', code=302)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# A Doodle-like service to change the poster on certain days.
|
|
23
|
-
# All posters are chosen based on the current date in PST.
|
|
24
|
-
|
|
25
|
-
from posters import VIDEO_POSTERS, VIDEO_DEFAULT, AUDIO_POSTERS, AUDIO_DEFAULT
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
# Timezone info for PST.
|
|
29
|
-
# I'm ignoring DST to avoid complicating the code.
|
|
30
|
-
class PST(datetime.tzinfo):
|
|
31
|
-
def utcoffset(self, dt):
|
|
32
|
-
return datetime.timedelta(hours=-8)
|
|
33
|
-
|
|
34
|
-
def dst(self, dt):
|
|
35
|
-
return datetime.timedelta(0)
|
|
36
|
-
|
|
37
|
-
def tzname(self, dt):
|
|
38
|
-
return 'PST'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def get_poster(poster_map, default_poster):
|
|
42
|
-
now = datetime.datetime.now(PST())
|
|
43
|
-
today = (now.month, now.day)
|
|
44
|
-
today_with_year = (now.month, now.day, now.year)
|
|
45
|
-
midnight = datetime.datetime(now.year, now.month, now.day, tzinfo=PST())
|
|
46
|
-
local_expiration = midnight + datetime.timedelta(days=1)
|
|
47
|
-
max_age = (local_expiration - now).total_seconds()
|
|
48
|
-
|
|
49
|
-
# For internal debugging and testing of the poster service, we can override
|
|
50
|
-
# the date. To set an override, open /assets/poster.jpg and run this in the
|
|
51
|
-
# JS console:
|
|
52
|
-
# document.cookie="posterdate=10-31"
|
|
53
|
-
# To clear an override, run:
|
|
54
|
-
# document.cookie="posterdate="
|
|
55
|
-
override = request.cookies.get('posterdate')
|
|
56
|
-
if override:
|
|
57
|
-
override_tuple = [int(x) for x in override.split('-')]
|
|
58
|
-
print('Date override:', repr(override_tuple))
|
|
59
|
-
|
|
60
|
-
if len(override_tuple) == 3:
|
|
61
|
-
# Override includes year.
|
|
62
|
-
today_with_year = tuple(override_tuple)
|
|
63
|
-
today = tuple(override_tuple[0:2])
|
|
64
|
-
elif len(override_tuple) == 2:
|
|
65
|
-
# Override does not include year, so add the current year.
|
|
66
|
-
today_with_year = tuple(override_tuple + [now.year])
|
|
67
|
-
today = tuple(override_tuple)
|
|
68
|
-
else:
|
|
69
|
-
# Bad override format. Ignore the year, but add a response header to
|
|
70
|
-
# indicate that the override failed. For internal debugging of the
|
|
71
|
-
# poster service.
|
|
72
|
-
print('Bad date override:', override, file=sys.stderr)
|
|
73
|
-
|
|
74
|
-
# Prefer a poster for this specific year.
|
|
75
|
-
name = poster_map.get(today_with_year, poster_map.get(today, default_poster))
|
|
76
|
-
path = 'posters/%s' % name
|
|
77
|
-
|
|
78
|
-
response = make_response(
|
|
79
|
-
send_file(path, last_modified=midnight, max_age=max_age))
|
|
80
|
-
|
|
81
|
-
response.headers['Access-Control-Allow-Origin'] = '*'
|
|
82
|
-
response.headers['Access-Control-Allow-Headers'] = 'If-Modified-Since,Range'
|
|
83
|
-
response.headers['Access-Control-Expose-Headers'] = 'Date'
|
|
84
|
-
response.headers['Access-Control-Max-Age'] = '2592000'
|
|
85
|
-
|
|
86
|
-
return response
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
@app.route('/assets/poster.jpg')
|
|
90
|
-
def get_video_poster():
|
|
91
|
-
return get_poster(VIDEO_POSTERS, VIDEO_DEFAULT)
|
|
92
|
-
|
|
93
|
-
@app.route('/assets/audioOnly.gif')
|
|
94
|
-
def get_audio_poster():
|
|
95
|
-
return get_poster(AUDIO_POSTERS, AUDIO_DEFAULT)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
Trek poster image derived from:
|
|
2
|
-
https://commons.wikimedia.org/wiki/File:Leonard_Nimoy_by_Gage_Skidmore_2.jpg
|
|
3
|
-
Author:
|
|
4
|
-
https://commons.wikimedia.org/wiki/User:Gage
|
|
5
|
-
License:
|
|
6
|
-
Creative Commons Share-Alike 3.0
|
|
7
|
-
http://creativecommons.org/licenses/by-sa/3.0/
|
|
8
|
-
|
|
9
|
-
Zombie poster image derived from:
|
|
10
|
-
https://www.flickr.com/photos/ofsmallthings/8055153041
|
|
11
|
-
Author:
|
|
12
|
-
https://www.flickr.com/photos/ofsmallthings/
|
|
13
|
-
License:
|
|
14
|
-
Creative Commons Share-Alike 2.0
|
|
15
|
-
https://creativecommons.org/licenses/by-sa/2.0/
|
|
16
|
-
|
|
17
|
-
Color bars April Fool's image from:
|
|
18
|
-
http://kittypizzadope.tumblr.com/post/66751567701
|
|
19
|
-
Author:
|
|
20
|
-
unknown
|
|
21
|
-
License:
|
|
22
|
-
unknown
|
|
23
|
-
|
|
24
|
-
Party hat image from:
|
|
25
|
-
https://pixabay.com/en/party-hat-celebration-birthday-42329/
|
|
26
|
-
Author:
|
|
27
|
-
unknown
|
|
28
|
-
License:
|
|
29
|
-
Creative Commons 0 - Public Domain 1.0
|
|
30
|
-
https://creativecommons.org/publicdomain/zero/1.0/deed.en
|
|
31
|
-
|
|
32
|
-
Party streamers image from:
|
|
33
|
-
https://pixabay.com/en/confetti-streamer-party-carnival-1925258/
|
|
34
|
-
Author:
|
|
35
|
-
Unknown
|
|
36
|
-
License:
|
|
37
|
-
Creative Commons 0 - Public Domain 1.0
|
|
38
|
-
https://creativecommons.org/publicdomain/zero/1.0/deed.en
|
|
39
|
-
|
|
40
|
-
Fireworks image from:
|
|
41
|
-
https://pixabay.com/illustrations/fireworks-sylvester-pyrotechnics-2248223/
|
|
42
|
-
Author:
|
|
43
|
-
https://pixabay.com/users/geralt-9301/
|
|
44
|
-
License:
|
|
45
|
-
Simplified Pixabay License
|
|
46
|
-
https://pixabay.com/service/license/
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Shaka Player Demo - Poster Definitions
|
|
2
|
-
# Copyright 2022 Google LLC
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
|
|
5
|
-
# A Doodle-like service to change the poster on certain days.
|
|
6
|
-
# All posters are chosen based on the current date in PST.
|
|
7
|
-
|
|
8
|
-
# Month constants to make specific dates easier to read.
|
|
9
|
-
JANUARY = 1
|
|
10
|
-
FEBRUARY = 2
|
|
11
|
-
MARCH = 3
|
|
12
|
-
APRIL = 4
|
|
13
|
-
MAY = 5
|
|
14
|
-
JUNE = 6
|
|
15
|
-
JULY = 7
|
|
16
|
-
AUGUST = 8
|
|
17
|
-
SEPTEMBER = 9
|
|
18
|
-
OCTOBER = 10
|
|
19
|
-
NOVEMBER = 11
|
|
20
|
-
DECEMBER = 12
|
|
21
|
-
|
|
22
|
-
# Special posters for certain days.
|
|
23
|
-
VIDEO_POSTERS = {
|
|
24
|
-
# These are the same every year:
|
|
25
|
-
# =====
|
|
26
|
-
(FEBRUARY, 14): 'valentines.png',
|
|
27
|
-
(APRIL, 1): 'colorbars.gif',
|
|
28
|
-
(APRIL, 5): 'trek.jpg', # "First Contact Day": https://bit.ly/2CSXbxw
|
|
29
|
-
(OCTOBER, 31): 'zombie.jpg',
|
|
30
|
-
# =====
|
|
31
|
-
|
|
32
|
-
# These birthday posters changed each year:
|
|
33
|
-
(DECEMBER, 19, 2015): '1yo.jpg',
|
|
34
|
-
(DECEMBER, 19, 2016): '2yo.png',
|
|
35
|
-
(DECEMBER, 19, 2017): '3yo.png',
|
|
36
|
-
|
|
37
|
-
# After this, the birthday poster shows for a whole week:
|
|
38
|
-
(DECEMBER, 17, 2018): '4yo.png',
|
|
39
|
-
(DECEMBER, 18, 2018): '4yo.png',
|
|
40
|
-
(DECEMBER, 19, 2018): '4yo.png',
|
|
41
|
-
(DECEMBER, 20, 2018): '4yo.png',
|
|
42
|
-
|
|
43
|
-
(DECEMBER, 19, 2019): '5yo.png',
|
|
44
|
-
(DECEMBER, 20, 2019): '5yo.png',
|
|
45
|
-
(DECEMBER, 21, 2019): '5yo.png',
|
|
46
|
-
(DECEMBER, 22, 2019): '5yo.png',
|
|
47
|
-
(DECEMBER, 23, 2019): '5yo.png',
|
|
48
|
-
(DECEMBER, 24, 2019): '5yo.png',
|
|
49
|
-
(DECEMBER, 25, 2019): '5yo.png',
|
|
50
|
-
|
|
51
|
-
(DECEMBER, 19, 2020): '6yo.png',
|
|
52
|
-
(DECEMBER, 20, 2020): '6yo.png',
|
|
53
|
-
(DECEMBER, 21, 2020): '6yo.png',
|
|
54
|
-
(DECEMBER, 22, 2020): '6yo.png',
|
|
55
|
-
(DECEMBER, 23, 2020): '6yo.png',
|
|
56
|
-
(DECEMBER, 24, 2020): '6yo.png',
|
|
57
|
-
(DECEMBER, 25, 2020): '6yo.png',
|
|
58
|
-
|
|
59
|
-
(DECEMBER, 19, 2021): '7yo.png',
|
|
60
|
-
(DECEMBER, 20, 2021): '7yo.png',
|
|
61
|
-
(DECEMBER, 21, 2021): '7yo.png',
|
|
62
|
-
(DECEMBER, 22, 2021): '7yo.png',
|
|
63
|
-
(DECEMBER, 23, 2021): '7yo.png',
|
|
64
|
-
(DECEMBER, 24, 2021): '7yo.png',
|
|
65
|
-
(DECEMBER, 25, 2021): '7yo.png',
|
|
66
|
-
|
|
67
|
-
(DECEMBER, 19, 2022): '8yo.png',
|
|
68
|
-
(DECEMBER, 20, 2022): '8yo.png',
|
|
69
|
-
(DECEMBER, 21, 2022): '8yo.png',
|
|
70
|
-
(DECEMBER, 22, 2022): '8yo.png',
|
|
71
|
-
(DECEMBER, 23, 2022): '8yo.png',
|
|
72
|
-
(DECEMBER, 24, 2022): '8yo.png',
|
|
73
|
-
(DECEMBER, 25, 2022): '8yo.png',
|
|
74
|
-
|
|
75
|
-
(DECEMBER, 19, 2023): '9yo.png',
|
|
76
|
-
(DECEMBER, 20, 2023): '9yo.png',
|
|
77
|
-
(DECEMBER, 21, 2023): '9yo.png',
|
|
78
|
-
(DECEMBER, 22, 2023): '9yo.png',
|
|
79
|
-
(DECEMBER, 23, 2023): '9yo.png',
|
|
80
|
-
(DECEMBER, 24, 2023): '9yo.png',
|
|
81
|
-
(DECEMBER, 25, 2023): '9yo.png',
|
|
82
|
-
|
|
83
|
-
(DECEMBER, 19, 2024): '10yo.png',
|
|
84
|
-
(DECEMBER, 20, 2024): '10yo.png',
|
|
85
|
-
(DECEMBER, 21, 2024): '10yo.png',
|
|
86
|
-
(DECEMBER, 22, 2024): '10yo.png',
|
|
87
|
-
(DECEMBER, 23, 2024): '10yo.png',
|
|
88
|
-
(DECEMBER, 24, 2024): '10yo.png',
|
|
89
|
-
(DECEMBER, 25, 2024): '10yo.png',
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
# The default poster.
|
|
93
|
-
VIDEO_DEFAULT = 'standard.png'
|
|
94
|
-
|
|
95
|
-
# Special audio-only posters.
|
|
96
|
-
AUDIO_POSTERS = {
|
|
97
|
-
# http://discordia.wikia.com/wiki/Chaoflux
|
|
98
|
-
(FEBRUARY, 19): 'audioRickRoll.gif',
|
|
99
|
-
# http://discordia.wikia.com/wiki/Discoflux
|
|
100
|
-
(MAY, 3): 'audioRickRoll.gif',
|
|
101
|
-
# http://discordia.wikia.com/wiki/Confuflux
|
|
102
|
-
(JULY, 15): 'audioRickRoll.gif',
|
|
103
|
-
# http://discordia.wikia.com/wiki/Bureflux
|
|
104
|
-
(SEPTEMBER, 26): 'audioRickRoll.gif',
|
|
105
|
-
# http://discordia.wikia.com/wiki/Afflux
|
|
106
|
-
(DECEMBER, 8): 'audioRickRoll.gif',
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
# The default audio-only poster.
|
|
110
|
-
AUDIO_DEFAULT = 'audioOnly.gif'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Time is an illusion; lunchtime doubly so.
|
package/build/README.md
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
This directory contains the scripts used to build and test Shaka Player. These
|
|
2
|
-
scripts can run on any platform that supports python v2.7 and JRE 8+.
|
|
3
|
-
|
|
4
|
-
* `all.py` simply runs `gendeps.py`, `check.py`, `docs.py`, and `build.py`.
|
|
5
|
-
It will forward `--force` to `build.py`.
|
|
6
|
-
* `build.py` builds the compiled library. This will fail if there are syntax
|
|
7
|
-
or type errors.
|
|
8
|
-
* `check.py` will check all the files for style violations and will check the
|
|
9
|
-
tests for type errors (but will not produce any compiled output).
|
|
10
|
-
* `checkversion.py` is used internally as part of our release process.
|
|
11
|
-
* `docs.py` will build the documentation. The output will be in `docs/api`.
|
|
12
|
-
* `gendeps.py` will create `deps.js` which is required to use the uncompiled
|
|
13
|
-
library.
|
|
14
|
-
* `shakaBuildHelpers.py` is a utility library used by these scripts.
|
|
15
|
-
* `stats.py` will read the compiled library and source map to get information
|
|
16
|
-
about the size of the compiled library.
|
|
17
|
-
* `test.py` will run the unit/integration tests.
|
|
18
|
-
|
|
19
|
-
All the scripts here use two environment variables:
|
|
20
|
-
|
|
21
|
-
* `PRINT_ARGUMENTS` if set, will print the command-line to subprocesses.
|
|
22
|
-
* `RAISE_INTERRUPT` if set, will raise interrupts rather than swallowing them.
|
|
23
|
-
|
|
24
|
-
```shell
|
|
25
|
-
$ PRINT_ARGUMENTS=1 build.py
|
|
26
|
-
git -C /path/to/shaka describe --tags --dirty
|
|
27
|
-
Compiling the library...
|
|
28
|
-
java -jar /path/to/shaka/node_modules/.../compiler.jar --language_in ...
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Configurable Build
|
|
32
|
-
|
|
33
|
-
`build.py` is used to compile the library and can also be used to produce
|
|
34
|
-
customized builds that contain only the features that your app requires.
|
|
35
|
-
`build.py` accepts an optional argument `--name` which will set the name of the
|
|
36
|
-
build, defaulting to `ui`. All other arguments are treated as commands
|
|
37
|
-
describing what to include in the build. If nothing is given, it will use
|
|
38
|
-
`+@complete`.
|
|
39
|
-
|
|
40
|
-
A command is either an addition or a subtraction. An addition is prefixed with
|
|
41
|
-
a `+`; a subtraction with a `-`. An addition will add the JavaScript file (or
|
|
42
|
-
build file) to the resulting library while a subtraction will remove it. After
|
|
43
|
-
the first character, there is either the path to a JavaScript file, or a `@`
|
|
44
|
-
followed by the name of a build file.
|
|
45
|
-
|
|
46
|
-
Build files are the files found in `build/types/`. These files are simply a
|
|
47
|
-
newline separated list of commands to execute. So if the `+@complete` command
|
|
48
|
-
is given, it will open the complete file and run it (which may in turn open
|
|
49
|
-
other build files). Subtracting a build file will reverse all actions applied
|
|
50
|
-
by the given file. So `-@networking` will remove all the networking plugins.
|
|
51
|
-
|
|
52
|
-
```shell
|
|
53
|
-
# Examples:
|
|
54
|
-
build.py +@complete
|
|
55
|
-
build.py +@complete -@networking
|
|
56
|
-
build.py --name custom +@manifests +@networking +../my_plugin.js
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Test
|
|
60
|
-
|
|
61
|
-
`test.py` accepts some arguments, but mostly will forward them to `karma`. You
|
|
62
|
-
can run `karma start --help` to get more info about the karma test runner. If
|
|
63
|
-
you don't have karma installed, it will be installed by `npm install` and will
|
|
64
|
-
be found in `node_modules/.bin`.
|
|
65
|
-
|
|
66
|
-
`test.py` has two arguments that it handles directly. `--force` will cause
|
|
67
|
-
the build to run even if there are no changes detected to the source code.
|
|
68
|
-
`--no-build` will not build the library even if it does not exist. Note that
|
|
69
|
-
some integration tests will not run without the compiled library present.
|
|
70
|
-
|
|
71
|
-
There are also several custom arguments that are handled in JavaScript by
|
|
72
|
-
`karma.conf.js` or the tests themselves (via `getClientArg`).
|
|
73
|
-
These arguments can be passed in using `test.py` or using `karma start`
|
|
74
|
-
directly:
|
|
75
|
-
* `--quick` will only run unit tests, skipping integration tests.
|
|
76
|
-
* `--enable-logging` will enable console logging. Logs will be printed to
|
|
77
|
-
the console. It also accepts a value for the log level `--enable-logging=1`,
|
|
78
|
-
defaulting to 3. See [lib/debug/log.js][] for the log levels (you must
|
|
79
|
-
pass the number).
|
|
80
|
-
* `--external` will run integration tests against external assets. This will
|
|
81
|
-
take an extremely long time to run, and requires a fast and reliable internet
|
|
82
|
-
connection.
|
|
83
|
-
* `--no-drm` will skip integration tests against DRM license servers. Not
|
|
84
|
-
specifying this flag requires a connection to the open internet.
|
|
85
|
-
* `--uncompiled` will run integration tests using the uncompiled library instead
|
|
86
|
-
of the compiled version.
|
|
87
|
-
* `--random` will run the tests in a random order to isolate test dependencies.
|
|
88
|
-
* `--seed` will seed the random test order so that the same order can be
|
|
89
|
-
reproduced across runs. Specify any value `--seed=xyz`.
|
|
90
|
-
* `--runs` allows running the tests multiple times in succession. This parameter
|
|
91
|
-
must be specified with a positive integer value, for example `--runs 5`.
|
|
92
|
-
* `--use-xvfb` will launch the browsers in a virtual display (only on Linux).
|
|
93
|
-
* `--filter` is used to filter a specific test or set of tests. This parameter
|
|
94
|
-
is specified as a RegExp string `--filter="DataUriPlugin .*\d"`.
|
|
95
|
-
|
|
96
|
-
The `karma` argument `--browsers` will set the browsers used to run the tests
|
|
97
|
-
(e.g. `--browsers Chrome,Firefox`). If you don't pass any arguments, `test.py`
|
|
98
|
-
will choose a defaults based on your platform. However, if you pass any
|
|
99
|
-
arguments to `test.py`, it will not choose browsers and you *must* pass
|
|
100
|
-
`--browsers`.
|
|
101
|
-
|
|
102
|
-
[lib/debug/log.js]: https://github.com/shaka-project/shaka-player/blob/main/lib/debug/log.js
|
|
103
|
-
|
|
104
|
-
## Stats
|
|
105
|
-
|
|
106
|
-
`stats.py` is used to print various stats about the compiled library. This is
|
|
107
|
-
used internally to determine dependencies and to determine the size of the
|
|
108
|
-
compiled library.
|
|
109
|
-
|
|
110
|
-
Before running the script, you have to compile it first. Then you need to pass
|
|
111
|
-
either the name of the build (e.g. `ui`) or the path to the `.map` file.
|
|
112
|
-
You will also need to pass some arguments to determine the output you want.
|
|
113
|
-
You must pass exactly one of the following:
|
|
114
|
-
|
|
115
|
-
* `-c` or `--class-deps` will print dependencies between classes.
|
|
116
|
-
* `-f` or `--function-deps` will print dependencies between functions.
|
|
117
|
-
* `-s` or `--function-sizes` will print the compiled size of the functions.
|
|
118
|
-
* `-t` or `--all-tokens` will print all the tokens in the source map.
|
|
119
|
-
|
|
120
|
-
For `--class-deps` and `--function-deps` you can also output in DOT format.
|
|
121
|
-
This format can be used to produce visual graphs of the dependencies. Passing
|
|
122
|
-
in `-d` or `--dot-format` will output in DOT format. Then the output can be
|
|
123
|
-
piped into another program to produce the output. For example using `graphviz`:
|
|
124
|
-
|
|
125
|
-
```shell
|
|
126
|
-
stats.py -c -d | fdb -Goverlap=prism | neato -n2 -Tsvg > out.svg
|
|
127
|
-
```
|
package/build/__init__.py
DELETED
|
File without changes
|