diff --git a/Dockerfile b/Dockerfile index 7d52c61..dc0465e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,7 @@ ADD front/e2e \ ADD front/src /tmp/src # generate build -RUN ng build --output-path=dist --configuration=production --base-href=/karideo/ --deploy-url=/karideo/ +RUN ng build --output-path=dist --configuration=production --base-href=/karusic/ --deploy-url=/karusic/ ###################################################################################### ## @@ -70,10 +70,10 @@ RUN apk add --no-cache wget ENV LANG=C.UTF-8 COPY --from=buildBack /tmp/out/maven/*.jar /application/application.jar -COPY --from=buildFront /tmp/dist /application/karideo/ +COPY --from=buildFront /tmp/dist /application/karusic/ WORKDIR /application/ EXPOSE 17080 -CMD ["java", "-Xms64M", "-Xmx1G", "-cp", "/application/application.jar", "org.kar.karideo.WebLauncher"] +CMD ["java", "-Xms64M", "-Xmx1G", "-cp", "/application/application.jar", "org.kar.karusic.WebLauncher"] diff --git a/back/Dockerfile b/back/Dockerfile index 2817048..8fc1c69 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -17,5 +17,5 @@ WORKDIR /application/ EXPOSE 18080 -CMD ["java", "-Xms64M", "-Xmx1G", "-cp", "/application/application.jar", "org.kar.karideo.WebLauncher"] +CMD ["java", "-Xms64M", "-Xmx1G", "-cp", "/application/application.jar", "org.kar.karusic.WebLauncher"] diff --git a/front/readme.md b/front/readme.md index 7ebac0a..821c2d2 100644 --- a/front/readme.md +++ b/front/readme.md @@ -32,3 +32,11 @@ npx ng lint ``` + +build the local image: + +docker build -t gitea.atria-soft.org/kangaroo-and-rabbit/karideo:latest . + +docker login gitea.atria-soft.org + +docker push gitea.atria-soft.org/kangaroo-and-rabbit/karideo:latest \ No newline at end of file diff --git a/front/src/app/component/element-player-audio/element-player-audio.html b/front/src/app/component/element-player-audio/element-player-audio.html index 41ce440..ee4a79f 100644 --- a/front/src/app/component/element-player-audio/element-player-audio.html +++ b/front/src/app/component/element-player-audio/element-player-audio.html @@ -1,8 +1,8 @@
- +
@@ -37,8 +37,18 @@ - - +
+
+
+
+ +
+ + +
+
\ No newline at end of file diff --git a/front/src/app/component/element-player-audio/element-player-audio.ts b/front/src/app/component/element-player-audio/element-player-audio.ts index d0eda87..7d8cd0f 100644 --- a/front/src/app/component/element-player-audio/element-player-audio.ts +++ b/front/src/app/component/element-player-audio/element-player-audio.ts @@ -27,13 +27,13 @@ export enum PlayMode { styleUrls: [ './element-player-audio.less' ] }) export class ElementPlayerAudioComponent implements OnInit { - audioPlayer: HTMLAudioElement; + mediaPlayer: HTMLVideoElement; duration: number; durationDisplay: string; - @ViewChild('audioPlayer') + @ViewChild('mediaPlayer') set mainVideoEl(el: ElementRef) { if(el !== null && el !== undefined) { - this.audioPlayer = el.nativeElement; + this.mediaPlayer = el.nativeElement; } } public mediaSource: string = undefined; @@ -44,6 +44,10 @@ export class ElementPlayerAudioComponent implements OnInit { public counttrack: number; public covers: string[]; + + public volume_value: number = 100; + public volume_displayMenu: boolean = false; + playStream: boolean; isPlaying: boolean; currentTime: any; @@ -286,14 +290,14 @@ export class ElementPlayerAudioComponent implements OnInit { } else if (this.playMode === PlayMode.PLAY_ALL) { this.onNext(); } else if (this.playMode === PlayMode.PLAY_ONE_LOOP) { - this.audioPlayer.currentTime = 0; + this.mediaPlayer.currentTime = 0; this.onPlay(); } else { if (this.localIdStreaming == this.localListStreaming.length-1) { this.localIdStreaming = 0; this.updateMediaStreamed(); if (this.localListStreaming.length == 1) { - this.audioPlayer.currentTime = 0; + this.mediaPlayer.currentTime = 0; this.onPlay(); } } else { @@ -338,37 +342,37 @@ export class ElementPlayerAudioComponent implements OnInit { changeTimeupdate(currentTime: any) { // console.log("time change "); // console.log(" ==> " + this.audioPlayer.currentTime); - this.currentTime = this.audioPlayer.currentTime; + this.currentTime = this.mediaPlayer.currentTime; this.currentTimeDisplay = this.convertIndisplayTime(this.currentTime); // console.log(" ==> " + this.currentTimeDisplay); } changeDurationchange(duration: any) { console.log('duration change '); - console.log(` ==> ${ this.audioPlayer.duration}`); - this.duration = this.audioPlayer.duration; + console.log(` ==> ${ this.mediaPlayer.duration}`); + this.duration = this.mediaPlayer.duration; this.durationDisplay = this.convertIndisplayTime(this.duration); } onPlay() { console.log('play'); - if(this.audioPlayer === null || - this.audioPlayer === undefined) { - console.log(`error element: ${ this.audioPlayer}`); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); return; } - this.audioPlayer.play(); + this.mediaPlayer.play(); } onPause() { console.log('pause'); - if(this.audioPlayer === null || - this.audioPlayer === undefined) { - console.log(`error element: ${ this.audioPlayer}`); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); return; } - this.audioPlayer.pause(); + this.mediaPlayer.pause(); } onPauseToggle() { @@ -383,13 +387,13 @@ export class ElementPlayerAudioComponent implements OnInit { onStop() { console.log('stop'); - if(this.audioPlayer === null || - this.audioPlayer === undefined) { - console.log(`error element: ${ this.audioPlayer}`); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); return; } - this.audioPlayer.pause(); - this.audioPlayer.currentTime = 0; + this.mediaPlayer.pause(); + this.mediaPlayer.currentTime = 0; } onBefore() { @@ -417,45 +421,82 @@ export class ElementPlayerAudioComponent implements OnInit { seek(newValue:any) { console.log(`seek ${ newValue.value}`); - if(this.audioPlayer === null || - this.audioPlayer === undefined) { - console.log(`error element: ${ this.audioPlayer}`); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); return; } - this.audioPlayer.currentTime = newValue.value; + this.mediaPlayer.currentTime = newValue.value; } onRewind() { console.log('rewind'); - if(this.audioPlayer === null || - this.audioPlayer === undefined) { - console.log(`error element: ${ this.audioPlayer}`); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); return; } - this.audioPlayer.currentTime = this.currentTime - 10; + this.mediaPlayer.currentTime = this.currentTime - 10; } onForward() { console.log('forward'); - if(this.audioPlayer === null || - this.audioPlayer === undefined) { - console.log(`error element: ${ this.audioPlayer}`); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); return; } - this.audioPlayer.currentTime = this.currentTime + 10; + this.mediaPlayer.currentTime = this.currentTime + 10; } onMore() { console.log('more'); - if(this.audioPlayer === null || - this.audioPlayer === undefined) { - console.log(`error element: ${ this.audioPlayer}`); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); return; } } + onVolumeMenu() { + this.volume_displayMenu = !this.volume_displayMenu; + //this.startHideTimer(); + } + + onVolume(newValue:any) { + console.log(`onVolume ${ newValue.value}`); + //this.startHideTimer(); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); + return; + } + this.volume_value = newValue.value; + this.mediaPlayer.volume = this.volume_value / 100; + this.mediaPlayer.muted = false; + } + + onVolumeMute() { + //this.startHideTimer(); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); + return; + } + this.mediaPlayer.muted = true; + } + + onVolumeUnMute() { + //this.startHideTimer(); + if(this.mediaPlayer === null || + this.mediaPlayer === undefined) { + console.log(`error element: ${ this.mediaPlayer}`); + return; + } + this.mediaPlayer.muted = false; + } } diff --git a/front/src/app/component/top-menu/top-menu.html b/front/src/app/component/top-menu/top-menu.html index 5121248..63d2784 100644 --- a/front/src/app/component/top-menu/top-menu.html +++ b/front/src/app/component/top-menu/top-menu.html @@ -105,7 +105,7 @@
-
+