Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Make the video responsive

Chocobozzzcb11e7757053
diff --git a/client/angular/videos/components/watch/videos-watch.component.scss b/client/angular/videos/components/watch/videos-watch.component.scss
index e69de29bb2..27f34b33d3 100644
--- a/client/angular/videos/components/watch/videos-watch.component.scss
+++ b/client/angular/videos/components/watch/videos-watch.component.scss
@@ -0,0 +1,3 @@
+.embed-responsive {
+ height: 100%;
+}
diff --git a/client/angular/videos/components/watch/videos-watch.component.ts b/client/angular/videos/components/watch/videos-watch.component.ts
index d1b90c190d..c35c0ab19f 100644
--- a/client/angular/videos/components/watch/videos-watch.component.ts
+++ b/client/angular/videos/components/watch/videos-watch.component.ts
@@ -40,7 +40,7 @@ export class VideosWatchComponent implements OnInit, CanDeactivate {
console.log('Adding ' + this.video.magnetUri + '.');
this.client.add(this.video.magnetUri, (torrent) => {
console.log('Added ' + this.video.magnetUri + '.');
- torrent.files[0].appendTo(this._elementRef.nativeElement, (err) => {
+ torrent.files[0].appendTo(this._elementRef.nativeElement.querySelector('.embed-responsive'), (err) => {
if (err) {
alert('Cannot append the file.');
console.error(err);