-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Leonardo Albuquerque
committed
Mar 21, 2023
1 parent
8c08a6d
commit c2fb994
Showing
12 changed files
with
205 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
@import "node_modules/video.js/dist/video-js.css"; | ||
@import "node_modules/@videojs/themes/fantasy/index.css"; | ||
|
||
.vjs-theme-forest { | ||
--vjs-theme-forest--primary: rgb(129, 140, 248); | ||
} | ||
|
||
.vjs-theme-forest.vjs-big-play-button:focus, | ||
.vjs-theme-forest:hover .vjs-big-play-button { | ||
background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' fill='%23818cf8'%3E%3Cpath fill-rule='evenodd' d='M44 88C19.738 88 0 68.262 0 44S19.738 0 44 0s44 19.738 44 44-19.738 44-44 44zm0-85C21.393 3 3 21.393 3 44c0 22.608 18.393 41 41 41s41-18.392 41-41C85 21.393 66.607 3 44 3zm16.063 43.898L39.629 60.741a3.496 3.496 0 01-3.604.194 3.492 3.492 0 01-1.859-3.092V30.158c0-1.299.712-2.483 1.859-3.092a3.487 3.487 0 013.604.194l20.433 13.843a3.497 3.497 0 01.001 5.795zm-1.683-3.311L37.946 29.744a.49.49 0 00-.276-.09.51.51 0 00-.239.062.483.483 0 00-.265.442v27.685c0 .262.166.389.265.442.1.053.299.118.515-.028L58.38 44.414A.489.489 0 0058.6 44a.49.49 0 00-.22-.413z'/%3E%3C/svg%3E"); | ||
} | ||
|
||
.video-js { | ||
position: initial; | ||
position: initial; | ||
width: 100%; | ||
} | ||
|
||
.video-js .vjs-control-bar { | ||
height: 6em; | ||
} | ||
|
||
.vjs-button > .vjs-icon-placeholder:before { | ||
font-size: 3.8em; | ||
} | ||
|
||
.video-js .vjs-button { | ||
width: 6em; | ||
} | ||
|
||
.vjs-theme-forest .vjs-volume-bar.vjs-slider-horizontal, | ||
.vjs-theme-forest .vjs-volume-panel, | ||
.vjs-theme-forest | ||
.vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, | ||
.vjs-theme-forest .vjs-volume-panel.vjs-volume-panel-horizontal:hover, | ||
.vjs-theme-forest | ||
.vjs-volume-panel:active | ||
.vjs-volume-control.vjs-volume-horizontal, | ||
.vjs-theme-forest .vjs-volume-panel:hover, | ||
.vjs-theme-forest | ||
.vjs-volume-panel:hover | ||
.vjs-volume-control.vjs-volume-horizontal { | ||
width: 8em; | ||
} | ||
|
||
.video-js | ||
.vjs-volume-panel | ||
.vjs-volume-control.vjs-slider-active.vjs-volume-horizontal, | ||
.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal, | ||
.video-js | ||
.vjs-volume-panel.vjs-hover | ||
.vjs-mute-control | ||
~ .vjs-volume-control.vjs-volume-horizontal, | ||
.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal, | ||
.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal, | ||
.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal { | ||
width: 8em; | ||
height: 6em; | ||
margin-right: 0; | ||
} | ||
|
||
.vjs-theme-forest .vjs-volume-bar:before { | ||
border-left-width: 8em; | ||
border-bottom-width: 5em; | ||
} | ||
|
||
.vjs-theme-forest .vjs-volume-level::before { | ||
border-left-width: 8em; | ||
border-bottom-width: 5em; | ||
} | ||
|
||
.vjs-theme-forest .vjs-progress-holder { | ||
height: 2em; | ||
} | ||
|
||
.video-js | ||
.vjs-progress-control:hover | ||
.vjs-progress-holder:focus | ||
.vjs-time-tooltip, | ||
.video-js .vjs-progress-control:hover .vjs-time-tooltip { | ||
font-size: 2em; | ||
} | ||
|
||
.video-js .vjs-time-tooltip { | ||
top: -2em; | ||
} | ||
|
||
.video-js .vjs-time-control { | ||
font-size: 2em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,39 @@ | ||
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; | ||
import { | ||
Component, | ||
OnInit, | ||
ViewChild, | ||
ElementRef, | ||
ViewEncapsulation, | ||
} from '@angular/core'; | ||
import { ActivatedRoute, Params } from '@angular/router'; | ||
import videojs from 'video.js'; | ||
import IClip from '../models/clips.model'; | ||
import { DatePipe } from '@angular/common'; | ||
|
||
@Component({ | ||
selector: 'app-clip', | ||
templateUrl: './clip.component.html', | ||
styleUrls: ['./clip.component.css'], | ||
encapsulation: ViewEncapsulation.None, | ||
providers: [DatePipe], | ||
}) | ||
export class ClipComponent implements OnInit { | ||
id: string = ''; | ||
clip?: IClip; | ||
|
||
@ViewChild('videoPlayer', { static: true }) target?: ElementRef; | ||
player?: videojs.Video; | ||
constructor(public route: ActivatedRoute) {} | ||
ngOnInit(): void { | ||
this.player = videojs(this.target?.nativeElement); | ||
this.route.params.subscribe((params: Params) => { | ||
this.id = params['id']; | ||
console.log(); | ||
this.route.data.subscribe((data) => { | ||
console.log(data); | ||
this.clip = data['clip'] as IClip; | ||
this.player?.src({ | ||
src: this.clip.url, | ||
type: 'video/mp4', | ||
}); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.