shaka-player 4.1.2 → 4.1.3
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/.github/workflows/build-and-test.yaml +67 -15
- package/.github/workflows/compute-incremental-coverage.py +251 -0
- package/.github/workflows/report-incremental-coverage.yaml +39 -0
- package/.github/workflows/selenium-lab-tests.yaml +44 -1
- package/AUTHORS +1 -0
- package/CHANGELOG.md +16 -0
- package/CONTRIBUTORS +1 -0
- package/demo/index.html +1 -1
- package/dist/controls.css +1 -1
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.externs.js +1 -1
- package/dist/shaka-player.compiled.debug.js +79 -76
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +1 -1
- package/dist/shaka-player.compiled.js +771 -769
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +1 -1
- package/dist/shaka-player.ui.debug.d.ts +1 -1
- package/dist/shaka-player.ui.debug.externs.js +1 -1
- package/dist/shaka-player.ui.debug.js +92 -90
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +1 -1
- package/dist/shaka-player.ui.js +905 -903
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/ui.md +6 -6
- package/karma.conf.js +3 -11
- package/lib/ads/client_side_ad_manager.js +1 -1
- package/lib/media/drm_engine.js +1 -1
- package/lib/media/streaming_engine.js +1 -0
- package/lib/player.js +1 -6
- package/lib/polyfill/media_capabilities.js +6 -0
- package/lib/text/cue.js +0 -5
- package/lib/text/simple_text_displayer.js +21 -9
- package/lib/text/ui_text_displayer.js +83 -19
- package/lib/util/buffer_utils.js +3 -0
- package/lib/util/object_utils.js +1 -0
- package/lib/util/stream_utils.js +23 -3
- package/lib/util/string_utils.js +63 -16
- package/package.json +2 -2
- package/test/text/simple_text_displayer_unit.js +27 -0
- package/test/text/ui_text_displayer_unit.js +65 -0
- package/test/util/string_utils_unit.js +46 -8
- package/ui/text_selection.js +2 -2
|
@@ -38,23 +38,34 @@ jobs:
|
|
|
38
38
|
needs: lint
|
|
39
39
|
strategy:
|
|
40
40
|
matrix:
|
|
41
|
-
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
|
42
|
-
browser: ["Chrome", "Firefox", "Edge", "Safari", "Safari-14"]
|
|
43
|
-
exclude:
|
|
44
|
-
- os: ubuntu-latest
|
|
45
|
-
browser: Edge
|
|
46
|
-
- os: windows-latest
|
|
47
|
-
browser: Safari
|
|
48
|
-
- os: windows-latest
|
|
49
|
-
browser: Safari-14
|
|
50
|
-
- os: ubuntu-latest
|
|
51
|
-
browser: Safari
|
|
52
|
-
- os: ubuntu-latest
|
|
53
|
-
browser: Safari-14
|
|
54
41
|
include:
|
|
55
42
|
# Run Linux browsers with xvfb, so they're in a headless X session.
|
|
43
|
+
# Additionally, generate a code coverage report from Linux Chrome.
|
|
44
|
+
- os: ubuntu-latest
|
|
45
|
+
browser: Chrome
|
|
46
|
+
extra_flags: "--use-xvfb --html-coverage-report"
|
|
56
47
|
- os: ubuntu-latest
|
|
48
|
+
browser: Firefox
|
|
57
49
|
extra_flags: "--use-xvfb"
|
|
50
|
+
|
|
51
|
+
- os: macos-latest
|
|
52
|
+
browser: Chrome
|
|
53
|
+
- os: macos-latest
|
|
54
|
+
browser: Firefox
|
|
55
|
+
- os: macos-latest
|
|
56
|
+
browser: Edge
|
|
57
|
+
- os: macos-latest
|
|
58
|
+
browser: Safari
|
|
59
|
+
- os: macos-latest
|
|
60
|
+
browser: Safari-14
|
|
61
|
+
|
|
62
|
+
- os: windows-latest
|
|
63
|
+
browser: Chrome
|
|
64
|
+
- os: windows-latest
|
|
65
|
+
browser: Firefox
|
|
66
|
+
- os: windows-latest
|
|
67
|
+
browser: Edge
|
|
68
|
+
|
|
58
69
|
# Disable fail-fast so that one matrix-job failing doesn't make the other
|
|
59
70
|
# ones end early.
|
|
60
71
|
fail-fast: false
|
|
@@ -86,10 +97,11 @@ jobs:
|
|
|
86
97
|
run: |
|
|
87
98
|
# Download Safari 14
|
|
88
99
|
# See also https://www.macupdate.com/app/mac/15675/apple-safari/old-versions
|
|
89
|
-
curl -Lv https://www.macupdate.com/action/download/
|
|
100
|
+
curl -Lv https://www.macupdate.com/action/download/62946 > Safari14.0CatalinaAuto.pkg.zip
|
|
90
101
|
|
|
91
102
|
# Install Safari 14 to homedir specifically.
|
|
92
|
-
|
|
103
|
+
unzip Safari14.0CatalinaAuto.pkg.zip
|
|
104
|
+
installer -pkg Safari14.0CatalinaAuto.pkg -target CurrentUserHomeDirectory
|
|
93
105
|
|
|
94
106
|
# Install a launcher that can execute a shell script to launch this
|
|
95
107
|
npm install karma-script-launcher --save-dev
|
|
@@ -113,6 +125,46 @@ jobs:
|
|
|
113
125
|
--reporters spec --spec-hide-passed \
|
|
114
126
|
${{ matrix.extra_flags }}
|
|
115
127
|
|
|
128
|
+
- name: Find coverage reports
|
|
129
|
+
id: coverage
|
|
130
|
+
if: always() # Even on failure of an earlier step.
|
|
131
|
+
shell: bash
|
|
132
|
+
run: |
|
|
133
|
+
# If the "coverage" directory exists...
|
|
134
|
+
if [ -d coverage ]; then
|
|
135
|
+
# Find the path to the coverage output folder. It includes the
|
|
136
|
+
# exact browser version in the path, so it will vary.
|
|
137
|
+
coverage_folder="$( (ls -d coverage/* || true) | head -1 )"
|
|
138
|
+
|
|
139
|
+
# Build a folder to stage all the coverage artifacts with
|
|
140
|
+
# predictable paths. The resulting zip file will not have any
|
|
141
|
+
# internal directories.
|
|
142
|
+
mkdir coverage/staging/
|
|
143
|
+
cp "$coverage_folder"/coverage.json coverage/staging/
|
|
144
|
+
cp "$coverage_folder"/coverage-details.json coverage/staging/
|
|
145
|
+
echo "${{ github.event.number }}" > coverage/staging/pr-number.json
|
|
146
|
+
|
|
147
|
+
echo "::set-output name=coverage_found::true"
|
|
148
|
+
echo "Coverage report staged."
|
|
149
|
+
else
|
|
150
|
+
echo "No coverage report generated."
|
|
151
|
+
fi
|
|
152
|
+
|
|
153
|
+
- name: Upload coverage reports
|
|
154
|
+
uses: actions/upload-artifact@v3
|
|
155
|
+
if: ${{ always() && steps.coverage.outputs.coverage_found }}
|
|
156
|
+
with:
|
|
157
|
+
name: coverage
|
|
158
|
+
# This will create a download called coverage.zip containing all of
|
|
159
|
+
# these files, with no internal folders.
|
|
160
|
+
path: |
|
|
161
|
+
coverage/staging/coverage.json
|
|
162
|
+
coverage/staging/coverage-details.json
|
|
163
|
+
coverage/staging/pr-number.json
|
|
164
|
+
# Since we've already filtered this step for instances where there is
|
|
165
|
+
# an environment variable set, the file should definitely be there.
|
|
166
|
+
if-no-files-found: error
|
|
167
|
+
|
|
116
168
|
build_in_docker:
|
|
117
169
|
# Don't waste time doing a full matrix of test runs when there was an
|
|
118
170
|
# obvious linter error.
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import io
|
|
19
|
+
import json
|
|
20
|
+
import re
|
|
21
|
+
import subprocess
|
|
22
|
+
import zipfile
|
|
23
|
+
|
|
24
|
+
# TODO(joeyparrish): Figure out how to get karma to output relative paths only.
|
|
25
|
+
def StripGitDir(path):
|
|
26
|
+
# Strip the path to the git clone, leaving only the source path within the
|
|
27
|
+
# repo.
|
|
28
|
+
return re.sub(r'.*?/(lib|ui)/', r'\1/', path)
|
|
29
|
+
|
|
30
|
+
def RunCommand(args, text=True):
|
|
31
|
+
proc = subprocess.run(args, capture_output=True, text=text)
|
|
32
|
+
if proc.returncode != 0:
|
|
33
|
+
raise RuntimeError("Command failed:", args, proc.stdout, proc.stderr)
|
|
34
|
+
return proc.stdout
|
|
35
|
+
|
|
36
|
+
def GitHubApi(repo, path, text=True):
|
|
37
|
+
args = ["gh", "api", "/repos/%s/%s" % (repo, path)]
|
|
38
|
+
output = RunCommand(args, text)
|
|
39
|
+
if text:
|
|
40
|
+
return json.loads(output)
|
|
41
|
+
else:
|
|
42
|
+
return output
|
|
43
|
+
|
|
44
|
+
def GetCoverageArtifacts(repo, run_id):
|
|
45
|
+
# Fetch all artifacts from this run ID.
|
|
46
|
+
api_path = "actions/runs/%s/artifacts" % run_id
|
|
47
|
+
results = GitHubApi(repo, api_path)["artifacts"]
|
|
48
|
+
# Get the one that is named "coverage" (should be the only one).
|
|
49
|
+
artifact = list(filter(lambda x: x["name"] == "coverage", results))[0]
|
|
50
|
+
|
|
51
|
+
# Fetch and open the zip file containing the artifacts.
|
|
52
|
+
api_path = "actions/artifacts/%s/zip" % artifact["id"]
|
|
53
|
+
zip_data = GitHubApi(repo, api_path, text=False)
|
|
54
|
+
return zipfile.ZipFile(io.BytesIO(zip_data), 'r')
|
|
55
|
+
|
|
56
|
+
def CoverageLines(coverage_range):
|
|
57
|
+
start_line = coverage_range["start"]["line"]
|
|
58
|
+
end_line = coverage_range["end"]["line"]
|
|
59
|
+
|
|
60
|
+
lines = set()
|
|
61
|
+
for line in range(start_line, end_line + 1):
|
|
62
|
+
lines.add(line)
|
|
63
|
+
return lines
|
|
64
|
+
|
|
65
|
+
class CoverageDetails(object):
|
|
66
|
+
def __init__(self, file_data):
|
|
67
|
+
json_data = json.loads(file_data)
|
|
68
|
+
|
|
69
|
+
self.files = {}
|
|
70
|
+
|
|
71
|
+
# The structure is something like:
|
|
72
|
+
# {
|
|
73
|
+
# "/path/to/lib/player.js": {
|
|
74
|
+
# "statementMap": { ... },
|
|
75
|
+
# "fnMap": { ... },
|
|
76
|
+
# "s": { ... }
|
|
77
|
+
# }
|
|
78
|
+
# }
|
|
79
|
+
for path, path_data in json_data.items():
|
|
80
|
+
path = StripGitDir(path)
|
|
81
|
+
|
|
82
|
+
statement_to_lines = {}
|
|
83
|
+
instrumented_lines = set()
|
|
84
|
+
|
|
85
|
+
# The function map is a structure to map where each function is in a
|
|
86
|
+
# source file:
|
|
87
|
+
# {
|
|
88
|
+
# "0": {
|
|
89
|
+
# "loc": {
|
|
90
|
+
# "start": {
|
|
91
|
+
# "line": 7,
|
|
92
|
+
# "column": 0
|
|
93
|
+
# },
|
|
94
|
+
# "end": {
|
|
95
|
+
# "line": 8,
|
|
96
|
+
# "column": 29
|
|
97
|
+
# }
|
|
98
|
+
# }
|
|
99
|
+
# },
|
|
100
|
+
# ...
|
|
101
|
+
# }
|
|
102
|
+
# We extract function locations and remove them from statement spans
|
|
103
|
+
# below, so that we don't count (for example) class declaration statements
|
|
104
|
+
# as containing all the lines of every method in the class.
|
|
105
|
+
function_locations = []
|
|
106
|
+
for key, value in path_data["fnMap"].items():
|
|
107
|
+
lines = CoverageLines(value["loc"])
|
|
108
|
+
function_locations.append(lines)
|
|
109
|
+
|
|
110
|
+
# The statement map is a structure to map where each statement is in a
|
|
111
|
+
# source file:
|
|
112
|
+
# {
|
|
113
|
+
# "0": {
|
|
114
|
+
# "start": {
|
|
115
|
+
# "line": 7,
|
|
116
|
+
# "column": 0
|
|
117
|
+
# },
|
|
118
|
+
# "end": {
|
|
119
|
+
# "line": 8,
|
|
120
|
+
# "column": 29
|
|
121
|
+
# }
|
|
122
|
+
# },
|
|
123
|
+
# ...
|
|
124
|
+
# }
|
|
125
|
+
for key, value in path_data["statementMap"].items():
|
|
126
|
+
# All the lines of the statement, which may include other functions or
|
|
127
|
+
# statements.
|
|
128
|
+
lines = CoverageLines(value)
|
|
129
|
+
|
|
130
|
+
# Subtract from that the lines of any function that is a subset of
|
|
131
|
+
# these lines. By excluding entire methods before adding back their
|
|
132
|
+
# child statements, we exclude empty lines in class methods.
|
|
133
|
+
for function_lines in function_locations:
|
|
134
|
+
if function_lines < lines: # strict subset
|
|
135
|
+
lines -= function_lines # set subtraction
|
|
136
|
+
|
|
137
|
+
# If this statement is inside the range of another statement, remove
|
|
138
|
+
# this inner range from that outer one. This is important because loops
|
|
139
|
+
# and conditional statements contain their inner branches.
|
|
140
|
+
for older_key, older_lines in statement_to_lines.items():
|
|
141
|
+
# Check for a proper subset (lines contains all elements of
|
|
142
|
+
# child_lines, but child_lines is not an equal set).
|
|
143
|
+
if lines < older_lines: # strict subset
|
|
144
|
+
statement_to_lines[older_key] -= lines # set subtraction
|
|
145
|
+
|
|
146
|
+
statement_to_lines[key] = lines
|
|
147
|
+
|
|
148
|
+
# Whatever is left in any statement, we count as instrumented.
|
|
149
|
+
for key, lines in statement_to_lines.items():
|
|
150
|
+
for line in lines:
|
|
151
|
+
instrumented_lines.add(line)
|
|
152
|
+
|
|
153
|
+
# The "s" field is a map from statement numbers to number of times
|
|
154
|
+
# executed.
|
|
155
|
+
executed_lines = set()
|
|
156
|
+
for key, executed in path_data["s"].items():
|
|
157
|
+
if executed:
|
|
158
|
+
for line in statement_to_lines[key]:
|
|
159
|
+
executed_lines.add(line)
|
|
160
|
+
|
|
161
|
+
self.files[path] = {
|
|
162
|
+
"instrumented": instrumented_lines,
|
|
163
|
+
"executed": executed_lines,
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
class PullRequest(object):
|
|
167
|
+
def __init__(self, repo, number):
|
|
168
|
+
data = GitHubApi(repo, "pulls/%d" % number)
|
|
169
|
+
sha = data["merge_commit_sha"]
|
|
170
|
+
|
|
171
|
+
self.number = number
|
|
172
|
+
self.changes = {}
|
|
173
|
+
|
|
174
|
+
files = GitHubApi(repo, "commits/%s" % sha)["files"]
|
|
175
|
+
|
|
176
|
+
for file_data in files:
|
|
177
|
+
# The patch field is missing for binary files. Skip those.
|
|
178
|
+
if "patch" not in file_data:
|
|
179
|
+
continue
|
|
180
|
+
|
|
181
|
+
filename = file_data["filename"]
|
|
182
|
+
patch = file_data["patch"]
|
|
183
|
+
|
|
184
|
+
# Parse through the unified diff in "patch" to find the touched line
|
|
185
|
+
# numbers.
|
|
186
|
+
touched_lines = []
|
|
187
|
+
line_number = None
|
|
188
|
+
for line in patch.split("\n"):
|
|
189
|
+
if line[0] == "@":
|
|
190
|
+
# Turns a header like "@@ -749,7 +757,19 @@ foo" into line number 757.
|
|
191
|
+
# Note that the last part of the new file range could be omitted:
|
|
192
|
+
# "@@ -0,0 +1 @@ foo"
|
|
193
|
+
new_file_range = line.split("+")[1].split(" @@")[0]
|
|
194
|
+
line_number = int(new_file_range.split(",")[0])
|
|
195
|
+
elif line[0] == " ":
|
|
196
|
+
line_number += 1
|
|
197
|
+
elif line[0] == "+":
|
|
198
|
+
touched_lines.append(line_number)
|
|
199
|
+
line_number += 1
|
|
200
|
+
|
|
201
|
+
self.changes[filename] = touched_lines
|
|
202
|
+
|
|
203
|
+
def IncrementalCoverage(pr, coverage_details):
|
|
204
|
+
num_changed = 0
|
|
205
|
+
num_covered = 0
|
|
206
|
+
|
|
207
|
+
for path in pr.changes:
|
|
208
|
+
if path in coverage_details.files:
|
|
209
|
+
changed_lines = pr.changes[path]
|
|
210
|
+
instrumented_lines = coverage_details.files[path]["instrumented"]
|
|
211
|
+
executed_lines = coverage_details.files[path]["executed"]
|
|
212
|
+
|
|
213
|
+
for line in changed_lines:
|
|
214
|
+
# Only count the instrumented lines, not whitespace or comments.
|
|
215
|
+
if line in instrumented_lines:
|
|
216
|
+
num_changed += 1
|
|
217
|
+
if line in executed_lines:
|
|
218
|
+
num_covered += 1
|
|
219
|
+
|
|
220
|
+
if num_changed == 0:
|
|
221
|
+
return None
|
|
222
|
+
return num_covered / num_changed
|
|
223
|
+
|
|
224
|
+
def main():
|
|
225
|
+
parser = argparse.ArgumentParser(
|
|
226
|
+
description="Compute incremental code coverage for a PR",
|
|
227
|
+
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
|
228
|
+
parser.add_argument(
|
|
229
|
+
"--repo",
|
|
230
|
+
required=True,
|
|
231
|
+
help="The GitHub repo, such as shaka-project/shaka-player")
|
|
232
|
+
parser.add_argument(
|
|
233
|
+
"--run-id",
|
|
234
|
+
required=True,
|
|
235
|
+
help="The workflow run ID to download coverage data from")
|
|
236
|
+
args = parser.parse_args()
|
|
237
|
+
|
|
238
|
+
artifacts = GetCoverageArtifacts(args.repo, args.run_id)
|
|
239
|
+
coverage_details = CoverageDetails(artifacts.read("coverage-details.json"))
|
|
240
|
+
pr_number = json.loads(artifacts.read("pr-number.json"))
|
|
241
|
+
pr = PullRequest(args.repo, pr_number)
|
|
242
|
+
coverage = IncrementalCoverage(pr, coverage_details)
|
|
243
|
+
|
|
244
|
+
print("::set-output name=pr_number::%d" % pr_number)
|
|
245
|
+
if coverage is None:
|
|
246
|
+
print("::set-output name=coverage::No instrumented code was changed.")
|
|
247
|
+
else:
|
|
248
|
+
print("::set-output name=coverage::%.2f%%" % (coverage * 100.0))
|
|
249
|
+
|
|
250
|
+
if __name__ == "__main__":
|
|
251
|
+
main()
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Report Incremental Coverage
|
|
2
|
+
|
|
3
|
+
# Runs when the build and test workflow completes. This will run with full
|
|
4
|
+
# privileges, even if the other workflow doesn't. That allows us to leave PR
|
|
5
|
+
# comments, when we would not be able to do so otherwise.
|
|
6
|
+
on:
|
|
7
|
+
workflow_run:
|
|
8
|
+
workflows: [Build and Test PR]
|
|
9
|
+
types: [completed]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
report:
|
|
13
|
+
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v2
|
|
19
|
+
|
|
20
|
+
- name: Compute incremental code coverage
|
|
21
|
+
id: compute
|
|
22
|
+
shell: bash
|
|
23
|
+
env:
|
|
24
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
25
|
+
# Fetches the coverage data from the run that triggered the report,
|
|
26
|
+
# parses it, compares it to the changed lines in the PR, and computes
|
|
27
|
+
# the incremental code coverage.
|
|
28
|
+
run: |
|
|
29
|
+
python .github/workflows/compute-incremental-coverage.py \
|
|
30
|
+
--repo ${{ github.repository }} \
|
|
31
|
+
--run-id ${{ github.event.workflow_run.id }}
|
|
32
|
+
|
|
33
|
+
- name: Report incremental code coverage
|
|
34
|
+
uses: thollander/actions-comment-pull-request@686ab1cab89e0f715a44a0d04b9fdfdd4f33d751
|
|
35
|
+
with:
|
|
36
|
+
message: "Incremental code coverage: ${{ steps.compute.outputs.coverage }}"
|
|
37
|
+
comment_includes: "Incremental code coverage: "
|
|
38
|
+
pr_number: ${{ steps.compute.outputs.pr_number }}
|
|
39
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -80,7 +80,50 @@ jobs:
|
|
|
80
80
|
--hostname karma.shakalab.rocks \
|
|
81
81
|
--port 61731 \
|
|
82
82
|
--grid-config build/shaka-lab.yaml \
|
|
83
|
-
--grid-address selenium-grid.lab:4444
|
|
83
|
+
--grid-address selenium-grid.lab:4444 \
|
|
84
|
+
--html-coverage-report
|
|
85
|
+
|
|
86
|
+
- name: Find coverage report
|
|
87
|
+
id: coverage
|
|
88
|
+
if: always() # Even on failure of an earlier step.
|
|
89
|
+
shell: bash
|
|
90
|
+
run: |
|
|
91
|
+
# If the directory exists...
|
|
92
|
+
if [ -d coverage ]; then
|
|
93
|
+
# Find the path to the coverage report specifically for Chrome on
|
|
94
|
+
# Linux. It includes the exact browser version in the path, so it
|
|
95
|
+
# will vary. Having a single path will make the artifact zip
|
|
96
|
+
# simpler, whereas using a wildcard in the upload step will result
|
|
97
|
+
# in a zip file with internal directories.
|
|
98
|
+
coverage_report="$( (ls coverage/Chrome*Linux*/coverage.json || true) | head -1 )"
|
|
99
|
+
|
|
100
|
+
# Show what's there, for debugging purposes.
|
|
101
|
+
ls -l coverage/
|
|
102
|
+
|
|
103
|
+
if [ -f "$coverage_report" ]; then
|
|
104
|
+
echo "Found coverage report: $coverage_report"
|
|
105
|
+
echo "::set-output name=coverage_report::$coverage_report"
|
|
106
|
+
else
|
|
107
|
+
echo "Could not locate coverage report!"
|
|
108
|
+
exit 1
|
|
109
|
+
fi
|
|
110
|
+
else
|
|
111
|
+
echo "No coverage report generated."
|
|
112
|
+
fi
|
|
113
|
+
|
|
114
|
+
- uses: actions/upload-artifact@v3
|
|
115
|
+
# If there's a coverage report, upload it, even if a previous step
|
|
116
|
+
# failed.
|
|
117
|
+
if: ${{ always() && steps.coverage.outputs.coverage_report }}
|
|
118
|
+
with:
|
|
119
|
+
# This will create a download called coverage.zip containing only
|
|
120
|
+
# coverage.json.
|
|
121
|
+
path: ${{ steps.coverage.outputs.coverage_report }}
|
|
122
|
+
name: coverage
|
|
123
|
+
# Since we've already filtered this step for instances where there is
|
|
124
|
+
# an environment variable set for this, the file should definitely be
|
|
125
|
+
# there.
|
|
126
|
+
if-no-files-found: error
|
|
84
127
|
|
|
85
128
|
- name: Report Final Commit Status
|
|
86
129
|
# Will run on success or failure, but not if the workflow is cancelled.
|
package/AUTHORS
CHANGED
|
@@ -43,6 +43,7 @@ Johan Sundström <oyasumi@gmail.com>
|
|
|
43
43
|
Jonas Birmé <jonas.birme@eyevinn.se>
|
|
44
44
|
Jozef Chúťka <jozefchutka@gmail.com>
|
|
45
45
|
Jun Hong Chong <chongjunhong@gmail.com>
|
|
46
|
+
Jürgen Kartnaller <kartnaller@lovelysystems.com>
|
|
46
47
|
JW Player <*@jwplayer.com>
|
|
47
48
|
Lucas Gabriel Sánchez <unkiwii@gmail.com>
|
|
48
49
|
Matthias Van Parijs <matvp91@gmail.com>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.1.3](https://github.com/shaka-project/shaka-player/compare/v4.1.2...v4.1.3) (2022-08-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add strictMissingProperties suppressions to unblock strict missing properties on union types. ([#4371](https://github.com/shaka-project/shaka-player/issues/4371)) ([e055893](https://github.com/shaka-project/shaka-player/commit/e055893eca165eb9c01493ea89de4da3fcf7737e))
|
|
9
|
+
* exception if on early adError ([#4362](https://github.com/shaka-project/shaka-player/issues/4362)) ([36023e8](https://github.com/shaka-project/shaka-player/commit/36023e89d44463bf9949b53e7f24f7d6c5fc4d73)), closes [#4004](https://github.com/shaka-project/shaka-player/issues/4004)
|
|
10
|
+
* Fix key ID byteswapping for PlayReady on PS4 ([#4377](https://github.com/shaka-project/shaka-player/issues/4377)) ([b8eb590](https://github.com/shaka-project/shaka-player/commit/b8eb590084a9871d95b3f1fccc1921d1da649e6a))
|
|
11
|
+
* Fix MediaCapabilities polyfill on Tizen and WebOS ([#4396](https://github.com/shaka-project/shaka-player/issues/4396)) ([259cd84](https://github.com/shaka-project/shaka-player/commit/259cd844863ffc754c3e130ee673014f7913670d)), closes [#4383](https://github.com/shaka-project/shaka-player/issues/4383) [#4357](https://github.com/shaka-project/shaka-player/issues/4357)
|
|
12
|
+
* Fix TextDecoder fallback and browser support check ([#4403](https://github.com/shaka-project/shaka-player/issues/4403)) ([45cae27](https://github.com/shaka-project/shaka-player/commit/45cae273efd1070a7bb266e7cca84b9905756a4a))
|
|
13
|
+
* Fix UI captions icon state ([#4384](https://github.com/shaka-project/shaka-player/issues/4384)) ([c31a57f](https://github.com/shaka-project/shaka-player/commit/c31a57fa19225e4a081f261958b678d389a9490b)), closes [#4358](https://github.com/shaka-project/shaka-player/issues/4358)
|
|
14
|
+
* Fix VP9 codec checks on Mac Firefox ([#4391](https://github.com/shaka-project/shaka-player/issues/4391)) ([227dfef](https://github.com/shaka-project/shaka-player/commit/227dfefa39befe5bc184e05a3f6a916b4cf04147))
|
|
15
|
+
* **text:** Fix cue region rendering in UI ([#4412](https://github.com/shaka-project/shaka-player/issues/4412)) ([4706572](https://github.com/shaka-project/shaka-player/commit/4706572b4582d56a51be1aa3295751c436cf6c07)), closes [#4381](https://github.com/shaka-project/shaka-player/issues/4381)
|
|
16
|
+
* **text:** Fix TTML render timing and line break issues ([#4407](https://github.com/shaka-project/shaka-player/issues/4407)) ([1c6deb4](https://github.com/shaka-project/shaka-player/commit/1c6deb42a013cc36cf37497ac9b22606a286fd20)), closes [#4381](https://github.com/shaka-project/shaka-player/issues/4381)
|
|
17
|
+
* Update v4.1.x branch Cast receiver ID ([582058b](https://github.com/shaka-project/shaka-player/commit/582058b2a22337ea2259c200949d51e594cba22a))
|
|
18
|
+
|
|
3
19
|
## [4.1.2](https://github.com/shaka-project/shaka-player/compare/v4.1.1...v4.1.2) (2022-07-14)
|
|
4
20
|
|
|
5
21
|
|
package/CONTRIBUTORS
CHANGED
|
@@ -70,6 +70,7 @@ Jono Ward <jonoward@gmail.com>
|
|
|
70
70
|
Jozef Chúťka <jozefchutka@gmail.com>
|
|
71
71
|
Julian Domingo <juliandomingo@google.com>
|
|
72
72
|
Jun Hong Chong <chongjunhong@gmail.com>
|
|
73
|
+
Jürgen Kartnaller <kartnaller@lovelysystems.com>
|
|
73
74
|
Leandro Ribeiro Moreira <leandro.ribeiro.moreira@gmail.com>
|
|
74
75
|
Lucas Gabriel Sánchez <unkiwii@gmail.com>
|
|
75
76
|
Matias Russitto <russitto@gmail.com>
|
package/demo/index.html
CHANGED
|
@@ -126,7 +126,7 @@ UNCOMPILED_JS = [
|
|
|
126
126
|
</div>
|
|
127
127
|
<main class="mdl-layout__content" id="main-div">
|
|
128
128
|
<div id="video-bar" class="hidden">
|
|
129
|
-
<div data-shaka-player-container data-shaka-player-cast-receiver-id="
|
|
129
|
+
<div data-shaka-player-container data-shaka-player-cast-receiver-id="06EDA6EE" class="video-container">
|
|
130
130
|
<video data-shaka-player autoplay playsinline id="video"></video>
|
|
131
131
|
</div>
|
|
132
132
|
</div>
|
package/dist/controls.css
CHANGED
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
52
52
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
53
53
|
* SOFTWARE.
|
|
54
|
-
*/.shaka-tooltips-on{overflow:visible}.shaka-tooltips-on>[class*=shaka-tooltip]{position:relative}.shaka-tooltips-on>[class*=shaka-tooltip]:active:after,.shaka-tooltips-on>[class*=shaka-tooltip]:focus-visible:after,.shaka-tooltips-on>[class*=shaka-tooltip]:hover:after{content:attr(aria-label);font-family:Roboto-Regular,Roboto,sans-serif;line-height:calc(32px / 2);white-space:nowrap;font-size:13px;background:rgba(35 35 35 / 90%);color:#fff;border-radius:3px;padding:5px 10px;position:absolute;bottom:calc(32px + 5px);left:calc(32px / 2);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%)}.shaka-tooltips-on>.shaka-tooltip-status:active:after,.shaka-tooltips-on>.shaka-tooltip-status:focus-visible:after,.shaka-tooltips-on>.shaka-tooltip-status:hover:after{content:attr(aria-label) " (" attr(shaka-status) ")"}.shaka-tooltips-on button:first-child:active:after,.shaka-tooltips-on button:first-child:focus-visible:after,.shaka-tooltips-on button:first-child:hover:after{left:0;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}.shaka-tooltips-on button:last-child:active:after,.shaka-tooltips-on button:last-child:focus-visible:after,.shaka-tooltips-on button:last-child:hover:after{left:32px;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxP.ttf) format('truetype')}@font-face{font-family:'Material Icons Round';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialiconsround/
|
|
54
|
+
*/.shaka-tooltips-on{overflow:visible}.shaka-tooltips-on>[class*=shaka-tooltip]{position:relative}.shaka-tooltips-on>[class*=shaka-tooltip]:active:after,.shaka-tooltips-on>[class*=shaka-tooltip]:focus-visible:after,.shaka-tooltips-on>[class*=shaka-tooltip]:hover:after{content:attr(aria-label);font-family:Roboto-Regular,Roboto,sans-serif;line-height:calc(32px / 2);white-space:nowrap;font-size:13px;background:rgba(35 35 35 / 90%);color:#fff;border-radius:3px;padding:5px 10px;position:absolute;bottom:calc(32px + 5px);left:calc(32px / 2);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%)}.shaka-tooltips-on>.shaka-tooltip-status:active:after,.shaka-tooltips-on>.shaka-tooltip-status:focus-visible:after,.shaka-tooltips-on>.shaka-tooltip-status:hover:after{content:attr(aria-label) " (" attr(shaka-status) ")"}.shaka-tooltips-on button:first-child:active:after,.shaka-tooltips-on button:first-child:focus-visible:after,.shaka-tooltips-on button:first-child:hover:after{left:0;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}.shaka-tooltips-on button:last-child:active:after,.shaka-tooltips-on button:last-child:focus-visible:after,.shaka-tooltips-on button:last-child:hover:after{left:32px;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxP.ttf) format('truetype')}@font-face{font-family:'Material Icons Round';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialiconsround/v107/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmM.otf) format('opentype')}.material-icons-round{font-family:'Material Icons Round';font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}/*# sourceMappingURL=controls.css.map */
|
package/dist/locales.js
CHANGED
|
@@ -721,45 +721,45 @@ shaka.ui.Locales.addTo = function(localization) {
|
|
|
721
721
|
* @const
|
|
722
722
|
*/
|
|
723
723
|
shaka.ui.Locales.Ids = {
|
|
724
|
+
ON: 'ON',
|
|
725
|
+
QUALITY: 'QUALITY',
|
|
726
|
+
AIRPLAY: 'AIRPLAY',
|
|
724
727
|
RESOLUTION: 'RESOLUTION',
|
|
725
|
-
|
|
726
|
-
UNMUTE: 'UNMUTE',
|
|
728
|
+
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
727
729
|
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
728
|
-
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
729
|
-
ON: 'ON',
|
|
730
|
-
AD_DURATION: 'AD_DURATION',
|
|
731
|
-
LANGUAGE: 'LANGUAGE',
|
|
732
730
|
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
733
|
-
|
|
734
|
-
|
|
731
|
+
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
732
|
+
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
733
|
+
LANGUAGE: 'LANGUAGE',
|
|
734
|
+
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
735
735
|
REPLAY: 'REPLAY',
|
|
736
|
-
|
|
736
|
+
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
|
|
737
|
+
PAUSE: 'PAUSE',
|
|
738
|
+
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
739
|
+
OFF: 'OFF',
|
|
740
|
+
AD_DURATION: 'AD_DURATION',
|
|
741
|
+
MUTE: 'MUTE',
|
|
742
|
+
SEEK: 'SEEK',
|
|
743
|
+
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
744
|
+
STATISTICS: 'STATISTICS',
|
|
737
745
|
MORE_SETTINGS: 'MORE_SETTINGS',
|
|
746
|
+
AD_PROGRESS: 'AD_PROGRESS',
|
|
747
|
+
SKIP_AD: 'SKIP_AD',
|
|
748
|
+
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
738
749
|
CAST: 'CAST',
|
|
739
|
-
|
|
740
|
-
STATISTICS: 'STATISTICS',
|
|
750
|
+
CAPTIONS: 'CAPTIONS',
|
|
741
751
|
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
|
|
742
|
-
AIRPLAY: 'AIRPLAY',
|
|
743
|
-
LIVE: 'LIVE',
|
|
744
|
-
AD_TIME: 'AD_TIME',
|
|
745
|
-
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
746
|
-
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
747
|
-
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
748
|
-
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
749
|
-
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
750
|
-
SEEK: 'SEEK',
|
|
751
|
-
REWIND: 'REWIND',
|
|
752
|
-
MUTE: 'MUTE',
|
|
753
|
-
FULL_SCREEN: 'FULL_SCREEN',
|
|
754
|
-
OFF: 'OFF',
|
|
755
752
|
VOLUME: 'VOLUME',
|
|
753
|
+
REWIND: 'REWIND',
|
|
754
|
+
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
756
755
|
FAST_FORWARD: 'FAST_FORWARD',
|
|
757
|
-
|
|
758
|
-
|
|
756
|
+
AD_TIME: 'AD_TIME',
|
|
757
|
+
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
758
|
+
PLAY: 'PLAY',
|
|
759
|
+
UNMUTE: 'UNMUTE',
|
|
760
|
+
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
759
761
|
BACK: 'BACK',
|
|
760
|
-
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
761
762
|
LOOP: 'LOOP',
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
QUALITY: 'QUALITY',
|
|
763
|
+
FULL_SCREEN: 'FULL_SCREEN',
|
|
764
|
+
LIVE: 'LIVE',
|
|
765
765
|
};
|
|
@@ -61,7 +61,6 @@ shaka.text.Cue.prototype.direction;
|
|
|
61
61
|
shaka.text.Cue.prototype.endTime;
|
|
62
62
|
/**
|
|
63
63
|
* @override
|
|
64
|
-
* @type {string}
|
|
65
64
|
*/
|
|
66
65
|
shaka.text.Cue.prototype.payload;
|
|
67
66
|
/**
|
|
@@ -386,6 +385,7 @@ shaka.util.BufferUtils = class {
|
|
|
386
385
|
* @param {?BufferSource} arr1
|
|
387
386
|
* @param {?BufferSource} arr2
|
|
388
387
|
* @return {boolean}
|
|
388
|
+
* @suppress {strictMissingProperties}
|
|
389
389
|
*/
|
|
390
390
|
static equal(arr1, arr2) {}
|
|
391
391
|
/**
|