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

Subtitles are not working from s3 bucket url #2929

Open
tyagi-bhoopesh opened this issue Apr 21, 2023 · 0 comments
Open

Subtitles are not working from s3 bucket url #2929

tyagi-bhoopesh opened this issue Apr 21, 2023 · 0 comments

Comments

@tyagi-bhoopesh
Copy link

I implemented the mediaelement into Angular v15, it doesn't show subtitles into ui.
here is my code for angular.
here is part of html code:

<video id="demo" width="100%" tabindex="0" style="max-width: 100%" preload="none" (play)="videoPlayed()" #videoPlayer>

Your browser does not support HTML5 video.

<track *ngFor="let i of vttlangs" src="{{i.signedUrl}}" kind="subtitles" srclang="{{i.langCode}}"
label="{{i.langName}}">

here is part of typescript implementation.

this.videoplayer.nativeElement.onloadeddata = () => {
this.video = new MediaElementPlayer(this.videoplayer.nativeElement, {
iconSprite: 'assets/img/mejs-controls.svg',
features: ["playpause", "volume", "current", "progress", "tracks", "markers", "fullscreen"],
alwaysShowControls:true,
hideCaptionsButtonWhenEmpty:false,
startLanguage: 'en',
success: (mediaelement: any) => {
mediaelement.pause();
}
});

it works when i added vtt files from asset folder, but i need to get from s3 bucket url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants