videogular / videogular2

The HTML5 video player for Angular 2
https://videogular.github.io/videogular2-showroom/#/
MIT License
672 stars 211 forks source link

videogular2 is giving and error that was missing in v6 #851

Closed p3x-robot closed 4 years ago

p3x-robot commented 5 years ago

Description

get this error:

RROR TypeError: Cannot read property 'readyState' of undefined
    at checkReadyState (vg-media.js:125)
    at Array.some (<anonymous>)
    at MapSubscriber.project (vg-media.js:127)
    at MapSubscriber._next (map.js:29)
    at MapSubscriber.next (Subscriber.js:49)
    at CombineLatestSubscriber.notifyNext (combineLatest.js:73)
    at InnerSubscriber._next (InnerSubscriber.js:11)
    at InnerSubscriber.next (Subscriber.js:49)
    at HTMLVideoElement.handler (fromEvent.js:20)
    at ZoneDelegate.invokeTask (zone-evergreen.js:391)

it is since v7, besides the imports are wrong, have to add a compiled path into the imports.

Expected Behavior

no error, the imports working as it was in v6

Actual Behavior

have to import :

import {VgCoreModule} from 'videogular2/compiled/core';
import {VgControlsModule} from 'videogular2/compiled/controls';
import {VgOverlayPlayModule} from 'videogular2/compiled/overlay-play';

Attachments

Try to include screenshots for bugs or design assets for enhancements image

warren32 commented 4 years ago

I was able to resolve this error by removing [vgMaster]="true" as one of the attributes.
Before (Error caused)

<video [vgMedia]="master"  [vgMaster]="true" id="masterVideo" preload="auto">
           <source [src]="'someurl.mp4'" type="video/mp4">
</video>

After (No error)

<video [vgMedia]="master" id="masterVideo" preload="auto">
           <source [src]="'someurl.mp4'" type="video/mp4">
</video>