nstudio / nativescript-videoplayer

:clapper: Video Player widget for NativeScript apps
MIT License
133 stars 59 forks source link

Not compatible with NativeScript 8.1 #197

Closed xblabs closed 3 years ago

xblabs commented 3 years ago

As this seems to be the only video component for NS, is there any chance we can expect an update for NS 8.1?

bradmartin commented 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.

xblabs commented 3 years ago

Got it to work Brad. Thanks! Was an issue with Svelte preprocess and the "src" attribute on the native element

eikaramba commented 3 years ago

@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" />
eikaramba commented 3 years ago

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. ;)

franconeilglovasa commented 2 years ago

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

Git: https://github.com/franconeilglovasa/nativeapp1