Plying video issue

I am uploading the video into my server and those videos i want to play into my app
How can i do that. please guide me anyone
Thanks

Use this plugin https://ionicframework.com/docs/native/streaming-media/ . It is working both on Ios and android . I am also using this .

can you share your code please.

check link and install plugin . add it in module.ts and in ur ts file . then use it.

actually i didn’t understand it .if you give me your code the i would be thankful to you

1 Like

actually i want to do like this.


Please help me anyone.

install this from cmd by running command

ionic cordova plugin add cordova-plugin-streaming-media
npm install --save @ionic-native/streaming-media

THen add it in your app.module.ts file

 providers: [ ... ,StreamingMedia,]   and import it there .

Then move to that file where you want to call that function . in html use click function like

** <div (click)=“playvideo()”>**
then move ts file and call function

public playvideo(){
let options: StreamingVideoOptions = {
successCallback: () => { console.log(‘Video played’) },
errorCallback: (e) => { console.log(‘Error streaming’) },
orientation: ‘landscape’
};
this.streamingMedia.playVideo(url, options); //here url is for video url
}

or you can simply use Vimeo.
Upload your video to Vimeo and get iframe embed tag.
It will work just fine and Vimeo video player is very stable.

If I want to play from my own server. is it possible ?

then try this Videogular 2:

It can play local files with a customizable player.

or you can try Video.js framework to build your own player:

videojs.com

To be honest, I wish Ionic ships with its own video player which anyone can easily customize.
Ideally, something like ion-video would be great…

1 Like

Hi, I have built this Video Playlist and it’s available in Ion2FullApp ELITE. As @jamesharvey suggests we also use videogular2 and works excellent.

https://videogular.github.io/videogular2/

http://videogular.github.io/videogular2/docs/getting-started/

Yes… check videogular sites and learn about videogular…

Can you give me a example of code.

http://videogular.github.io/videogular2/docs/getting-started/

Check this link. It works really well on Ionic 3.
I think Videogular2 is the best video player for local files… it’s very stable.

already shared code . It is so simple and i have already shared steps to do it .

I have implemented the same in iOS. video playing is working fine. But when i call this function before starting the video, i am getting no callback. anyone faced same issue?

how do i access local video ? my video is assets/videos/xxx.mp4