Search code examples
html5-videovideogular

Playing videos from Google drive with videogular2


I am trying to use videogular2 and I have simply replaced the static video content link with a shareable link from Google drive that points to an MP4 video file.

                <vg-player>
                    <video [vgMedia]="media" #media id="singleVideo" preload="auto" controls>
                        <source src="https://drive.google.com/open?id=xyz" type="video/mp4">
                    </video>
                </vg-player>

Under Chrome browser the video player shows a resistance icon at the center and cannot play anything as it can be seen at the following screenshot: Chrome browser

Under Internet Explorer the video player shows the text "Invalid source" and the play button on the left as it can be seen on the next image: Internet Explorer

But if I use the sample URL: http://static.videogular.com/assets/videos/videogular.mp4 it works very well.

I would appreciate any ideas/pointers related to what I am doing wrong.


Solution

  • I had the same problem and solve it using an address like the following:

    https://drive.google.com/uc?id=ID_OF_YOUR_VIDEO&export=download&authuser=0