Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating Cta608Parser From SVTA's Comon-Media-Library #4522

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,246 changes: 0 additions & 1,246 deletions externals/cea608-parser.js

This file was deleted.

10 changes: 5 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as CommonMediaLibrary from '@svta/common-media-library';
import { CommonMediaRequest, CommonMediaResponse, RequestInterceptor, ResponseInterceptor } from '@svta/common-media-library/request'
agajassi marked this conversation as resolved.
Show resolved Hide resolved

export = dashjs;
export as namespace dashjs;
Expand Down Expand Up @@ -1527,13 +1527,13 @@ declare namespace dashjs {

setProtectionData(value: ProtectionDataSet): void;

addRequestInterceptor(interceptor: CommonMediaLibrary.RequestInterceptor): void;
addRequestInterceptor(interceptor: RequestInterceptor): void;

removeRequestInterceptor(interceptor: CommonMediaLibrary.RequestInterceptor): void;
removeRequestInterceptor(interceptor: RequestInterceptor): void;

addResponseInterceptor(interceptor: CommonMediaLibrary.ResponseInterceptor): void;
addResponseInterceptor(interceptor: ResponseInterceptor): void;

removeResponseInterceptor(interceptor: CommonMediaLibrary.ResponseInterceptor): void;
removeResponseInterceptor(interceptor: ResponseInterceptor): void;

registerLicenseRequestFilter(filter: RequestFilter): void;

Expand Down
127 changes: 117 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"sinon": "^17.0.1",
"stream-browserify": "^3.0.0",
"string-replace-loader": "^3.1.0",
"timers-browserify": "^2.0.12",
"typescript": "^5.4.5",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
Expand All @@ -56,7 +57,7 @@
"yargs": "^17.7.2"
},
"dependencies": {
"@svta/common-media-library": "^0.6.4",
"@svta/common-media-library": "^0.7.1",
"bcp-47-match": "^2.0.3",
"bcp-47-normalize": "^2.3.0",
"codem-isoboxer": "0.3.9",
Expand Down
4 changes: 2 additions & 2 deletions src/streaming/MediaPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
import cea608parser from '../../externals/cea608-parser.js';
import {Cta608Parser} from '@svta/common-media-library/cta/608/Cta608Parser';
import Constants from './constants/Constants.js';
import DashConstants from '../dash/constants/DashConstants.js';
import MetricsConstants from './constants/MetricsConstants.js';
Expand Down Expand Up @@ -371,7 +371,7 @@ function MediaPlayer() {

adapter.setConfig({
constants: Constants,
cea608parser: cea608parser,
cea608parser: new Cta608Parser(),
errHandler: errHandler,
BASE64: BASE64
});
Expand Down
4 changes: 2 additions & 2 deletions src/streaming/net/FetchLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ function FetchLoader() {

/**
* Load request
* @param {CommonMediaLibrary.request.CommonMediaRequest} httpRequest
* @param {CommonMediaLibrary.request.CommonMediaResponse} httpResponse
* @param {CommonMediaRequest} httpRequest
* @param {CommonMediaResponse} httpResponse
*/
function load(httpRequest, httpResponse) {
// Variables will be used in the callback functions
Expand Down
6 changes: 3 additions & 3 deletions src/streaming/net/HTTPLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ function HTTPLoader(cfg) {
const traces = [];
let firstProgress, requestStartTime, lastTraceTime, lastTraceReceivedCount, progressTimeout;

let httpRequest; // CommonMediaLibrary.request.CommonMediaRequest
let httpResponse; // CommonMediaLibrary.request.CommonMediaResponse
let httpRequest; // CommonMediaRequest
let httpResponse; // CommonMediaResponse

requestObject.bytesLoaded = NaN;
requestObject.bytesTotal = NaN;
Expand Down Expand Up @@ -400,7 +400,7 @@ function HTTPLoader(cfg) {
customData: { request: requestObject }
};

// Init response (CommonMediaLibrary.request.CommoneMediaResponse)
// Init response (CommoneMediaResponse)
httpResponse = {
request: httpRequest,
resourceTiming: {
Expand Down
4 changes: 2 additions & 2 deletions src/streaming/net/XHRLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function XHRLoader() {

/**
* Load request
* @param {CommonMediaLibrary.request.CommonMediaRequest} httpRequest
* @param {CommonMediaLibrary.request.CommonMediaResponse} httpResponse
* @param {CommonMediaRequest} httpRequest
* @param {CommonMediaResponse} httpResponse
*/
function load(httpRequest, httpResponse) {
xhr = new XMLHttpRequest();
Expand Down
Loading