diff --git a/src/app/player/player.component.ts b/src/app/player/player.component.ts
index e6f6767..bcbb183 100644
--- a/src/app/player/player.component.ts
+++ b/src/app/player/player.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, HostListener, EventEmitter, OnDestroy, AfterViewInit, ViewChild, ChangeDetectorRef } from '@angular/core';
+import { Component, OnInit, HostListener, OnDestroy, AfterViewInit, ViewChild, ChangeDetectorRef } from '@angular/core';
import { VgApiService } from '@videogular/ngx-videogular/core';
import { PostsService } from 'app/posts.services';
import { ActivatedRoute, Router } from '@angular/router';
@@ -15,6 +15,7 @@ export interface IMedia {
src: string;
type: string;
label: string;
+ url: string;
}
@Component({
@@ -133,7 +134,8 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy {
title: this.name,
label: this.name,
src: this.url,
- type: 'video/mp4'
+ type: 'video/mp4',
+ url: this.url
}
this.playlist.push(imedia);
this.currentItem = this.playlist[0];
@@ -229,7 +231,8 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy {
title: file_obj['title'],
src: fullLocation,
type: mime_type,
- label: file_obj['title']
+ label: file_obj['title'],
+ url: file_obj['url']
}
this.playlist.push(mediaObject);
}
@@ -289,13 +292,6 @@ export class PlayerComponent implements OnInit, AfterViewInit, OnDestroy {
this.currentItem = item;
}
- getFileInfos() {
- const fileNames = this.getFileNames();
- this.postsService.getFileInfo(fileNames, this.type, false).subscribe(res => {
-
- });
- }
-
getFileNames() {
const fileNames = [];
for (let i = 0; i < this.playlist.length; i++) {
diff --git a/src/app/posts.services.ts b/src/app/posts.services.ts
index 1bfd190..0118ac5 100644
--- a/src/app/posts.services.ts
+++ b/src/app/posts.services.ts
@@ -614,6 +614,11 @@ export class PostsService implements CanActivate {
this.httpOptions);
}
+ getSponsorBlockDataForVideo(id_hash) {
+ const sponsor_block_api_path = 'https://sponsor.ajay.app/api/';
+ return this.http.get(sponsor_block_api_path + `skipSegments/${id_hash}`);
+ }
+
public openSnackBar(message: string, action: string = '') {
this.snackBar.open(message, action, {
duration: 2000,
diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html
index c747ec8..bad9daf 100644
--- a/src/app/settings/settings.component.html
+++ b/src/app/settings/settings.component.html
@@ -266,12 +266,15 @@
Auto-download Twitch Chat
-
+
+
+ Use SponsorBlock API
+