question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

video is not playing ,when load from database

See original GitHub issue

Hi , we are trying to integrate videoangular player with angular4, and its working also. when I put static video URL in the template. but when I load video URL from the database , the video is not playing. i checked inspect element video URL is correct loading but the video is not playing . below is my code .

static code : working

  <vg-player>
            <video [vgMedia]="media" #media id="singleVideo" preload="auto" controls>
              <source src = "xyz.mp4" type="video/mp4">
            </video>
          </vg-player>

dynamic code : not working

 <vg-player>
            <video [vgMedia]="media" #media id="singleVideo" preload="auto" controls>
              <source src = "{{single_article['video_url']}}" type="video/mp4">
            </video>
          </vg-player>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
BGBRWRcommented, Oct 6, 2017

@cstrd Adding a *ngIf to the <vg-player> element will make sure vg-player won’t render without a source.

<vg-player *ngIf="single_article">
    <video [vgMedia]="media" #media id="singleVideo" preload="auto" controls>
        <source src="{{single_article['video_url']}}" type="video/mp4">
    </video>
</vg-player>
0reactions
Elecashcommented, Oct 20, 2017

Closing then 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Video Not Playing Issue - Kernel Data Recovery
How to Fix 'Video not playing' Error · Click on the “+” sign to add a corrupt video you wish to repair. Add...
Read more >
How to fix embedded Videos Not Playing in Google Chrome
Summary: This blog is an ultimate guide to fix Google Chrome embedded videos not playing or working error. Slow, stuttering or sluggish ...
Read more >
I cant get my videos to show on my webpage - Stack Overflow
I'm using php to load videos from my MYSQL database and display them on a web page. The videos are stored as urls...
Read more >
Troubleshooting Video Playback Problems
If you experience any of the following occurrences when playing videos, for numerous videos on the site: A "Sorry, clip not found.
Read more >
Video and Audio APIs - Learn web development | MDN
At this point, if you load the HTML you should see a perfectly normal HTML video player, with the native controls rendered.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found