Closed xblabs closed 3 years ago
Should work fine. Do you have errors or what's happening? I think the demo app is working fine, so more info about your project would be helpful and errors or what you see happening.
Got it to work Brad. Thanks! Was an issue with Svelte preprocess and the "src" attribute on the native element
@henryschmieder can you elaborate how you were able to fix it? also using svelte-native. for me there is just no error, but i don't see anything in the UI
import { Video } from 'nativescript-videoplayer';
registerNativeViewElement('videoPlayer', () => Video);
then
<videoPlayer id="nativeVideoPlayer" controls="true" loop="true" autoplay="true" width="100%"
src="~/images/rendering.mp4" />
nevermind i added webpack.Utils.addCopyRule('**/*.mp4')
to my webpack config and made sure to have a height attribute. The error actually was also because height was missing. ;)
Hi!
How did you manage to play the video? Using NS 8.3.3 cant play any video that is from the website.
<VideoPlayer
src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
autoplay="false"
height="300"></VideoPlayer>
// somewhere at top of your component or bootstrap file
import { registerElement } from "@nativescript/angular";
import { Video } from 'nativescript-videoplayer';
registerElement("VideoPlayer", () => Video);
// documentation: https://docs.nativescript.org/angular/plugins/angular-third-party.html#simple-elements
As this seems to be the only video component for NS, is there any chance we can expect an update for NS 8.1?