mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
improve
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PublicationVideoManagerService } from './publication-video-manager.service';
|
||||
|
||||
describe('PublicationVideoManagerService', () => {
|
||||
let service: PublicationVideoManagerService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(PublicationVideoManagerService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PublicationVideoManagerService {
|
||||
|
||||
container: HTMLDivElement
|
||||
scrollLimit: number = 0
|
||||
selectedVideo: SelectedPublication
|
||||
|
||||
constructor() {}
|
||||
|
||||
setSelectedVideo(selectedVideo: SelectedPublication) {
|
||||
this.selectedVideo = selectedVideo
|
||||
}
|
||||
|
||||
setContainer(element: HTMLDivElement) {
|
||||
this.container = element
|
||||
|
||||
console.log(this.container, "container")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class SelectedPublication {
|
||||
position: number
|
||||
video: HTMLVideoElement
|
||||
constructor({position, video}) {
|
||||
this.position = position
|
||||
this.video = video
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user