1
0
Fork 0

Make the video responsive

This commit is contained in:
Chocobozzz 2016-04-28 19:55:41 +02:00
parent d908a155df
commit cb11e77570
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
.embed-responsive {
height: 100%;
}

View file

@ -40,7 +40,7 @@ export class VideosWatchComponent implements OnInit, CanDeactivate {
console.log('Adding ' + this.video.magnetUri + '.'); console.log('Adding ' + this.video.magnetUri + '.');
this.client.add(this.video.magnetUri, (torrent) => { this.client.add(this.video.magnetUri, (torrent) => {
console.log('Added ' + this.video.magnetUri + '.'); 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) { if (err) {
alert('Cannot append the file.'); alert('Cannot append the file.');
console.error(err); console.error(err);