mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Make embed show video in full-screen.
This commit is contained in:
		
							parent
							
								
									3d82817dad
								
							
						
					
					
						commit
						4ef653df31
					
				
					 2 changed files with 22 additions and 4 deletions
				
			
		| 
						 | 
					@ -2,7 +2,8 @@
 | 
				
			||||||
    <div class="uk-container-expand">
 | 
					    <div class="uk-container-expand">
 | 
				
			||||||
        <div
 | 
					        <div
 | 
				
			||||||
            data-shaka-player-container
 | 
					            data-shaka-player-container
 | 
				
			||||||
            style="width: 100%; height: 100%; max-height: 75vh; min-height: 250px; background: #000"
 | 
					            style="width: 100%; height: 100%; background: #000"
 | 
				
			||||||
 | 
					            :style="!isEmbed ? { 'max-height': '75vh', 'min-height': '250px' } : {}"
 | 
				
			||||||
            ref="container"
 | 
					            ref="container"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
            <video
 | 
					            <video
 | 
				
			||||||
| 
						 | 
					@ -42,6 +43,7 @@ export default {
 | 
				
			||||||
        sponsors: Object,
 | 
					        sponsors: Object,
 | 
				
			||||||
        selectedAutoPlay: Boolean,
 | 
					        selectedAutoPlay: Boolean,
 | 
				
			||||||
        selectedAutoLoop: Boolean,
 | 
					        selectedAutoLoop: Boolean,
 | 
				
			||||||
 | 
					        isEmbed: Boolean,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,16 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
    <div class="uk-container uk-container-xlarge" v-if="video">
 | 
					    <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 999" v-if="video && isEmbed">
 | 
				
			||||||
 | 
					        <Player
 | 
				
			||||||
 | 
					            ref="videoPlayer"
 | 
				
			||||||
 | 
					            :video="video"
 | 
				
			||||||
 | 
					            :sponsors="sponsors"
 | 
				
			||||||
 | 
					            :selectedAutoPlay="false"
 | 
				
			||||||
 | 
					            :selectedAutoLoop="selectedAutoLoop"
 | 
				
			||||||
 | 
					            :isEmbed="isEmbed"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="uk-container uk-container-xlarge" v-if="video && !isEmbed">
 | 
				
			||||||
        <ErrorHandler v-if="video && video.error" :message="video.message" :error="video.error" />
 | 
					        <ErrorHandler v-if="video && video.error" :message="video.message" :error="video.error" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <div v-show="!video.error">
 | 
					        <div v-show="!video.error">
 | 
				
			||||||
| 
						 | 
					@ -128,7 +139,7 @@ export default {
 | 
				
			||||||
            if (this.active) this.$refs.videoPlayer.loadVideo();
 | 
					            if (this.active) this.$refs.videoPlayer.loadVideo();
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        this.getSponsors();
 | 
					        this.getSponsors();
 | 
				
			||||||
        if (this.getPreferenceBoolean("comments", true)) this.getComments();
 | 
					        if (!this.isEmbed && this.getPreferenceBoolean("comments", true)) this.getComments();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    activated() {
 | 
					    activated() {
 | 
				
			||||||
        this.active = true;
 | 
					        this.active = true;
 | 
				
			||||||
| 
						 | 
					@ -181,7 +192,7 @@ export default {
 | 
				
			||||||
                    if (!this.video.error) {
 | 
					                    if (!this.video.error) {
 | 
				
			||||||
                        document.title = this.video.title + " - Piped";
 | 
					                        document.title = this.video.title + " - Piped";
 | 
				
			||||||
                        this.channelId = this.video.uploaderUrl.split("/")[2];
 | 
					                        this.channelId = this.video.uploaderUrl.split("/")[2];
 | 
				
			||||||
                        this.fetchSubscribedStatus();
 | 
					                        if (!this.isEmbed) this.fetchSubscribedStatus();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        this.video.description = this.purifyHTML(
 | 
					                        this.video.description = this.purifyHTML(
 | 
				
			||||||
                            this.video.description
 | 
					                            this.video.description
 | 
				
			||||||
| 
						 | 
					@ -246,6 +257,11 @@ export default {
 | 
				
			||||||
            return this.$route.query.v || this.$route.params.v;
 | 
					            return this.$route.query.v || this.$route.params.v;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    computed: {
 | 
				
			||||||
 | 
					        isEmbed(_this) {
 | 
				
			||||||
 | 
					            return String(_this.$route.path).indexOf("/embed/") == 0;
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    components: {
 | 
					    components: {
 | 
				
			||||||
        Player,
 | 
					        Player,
 | 
				
			||||||
        VideoItem,
 | 
					        VideoItem,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue