Someone is playing videos on ionic 2 ? Which plugin should I use?
You could use the video element if you have the video local?
If not, most external video services have embed codes you could use. This should work without any issues.
Thanks, iframe works!
How to use vedio player plugin and call from html page ?
I am using ionic2 RC2.0 after inspecting i am getting error saying vedio-player plugin is not installed but plugins it is there .
For some reason its not calling that plugin not playing video … Testing on Android device
Let me know where i should put my audio file and URL since i am not finding android_assets directory in platform of android …
Thanks in advance …
Hi mhartington , its good to see the posts u do … I need some help the questions are mentioned below…
How to use vedio player plugin and call from html page ?
I am using ionic2 RC2.0 after inspecting i am getting error saying vedio-player plugin is not installed but plugins it is there .
For some reason its not calling that plugin not playing video … Testing on Android device
Let me know where i should put my audio file and URL since i am not finding android_assets directory in platform of android …
Thanks in advance …
Hi gabrielmalinosqui ,
I was trying with playing videos and audio file for videos i tried to include the VideoPlayer ionic native plugin but its coming to exception … May i know how you make that work with iframe .
In fact i am new to this field i need to know as soon as possible
My environment
Os : windows 10
ionic v2 RC2
Hi, does this work in all platforms? I am concern about IOs. Can you please confirm it.
Videos kept in html5 video tag are breaking in mobile, they are not responisive. Please suggest me some ways to make it reponisve
<video fullscreen=“fullscreen” autoplay=“true” (ended)=“videoEnded()” controls>
<ion-content>
<video fullscreen="fullscreen" autoplay="true" (ended)="videoEnded()" controls>
<source src="assets/videos/voya_vid.mov" type="video/mp4">
</video>
In case if you still have this problem you can use http://ionicframework.com/docs/native/video-player/ or http://ionicframework.com/docs/native/streaming-media/.
Video player:- it’s not working totally.
Streaming-media: it’s working,but not working for all videos.
Can you please suggest anything.
@abinas444 what you want to achieve and where you are facing the problem?
1st:- for Video player i am not able to install the plugin by using
ionic cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git
as per the ionic documentation.
Then i tried this issue, but could not able install it also.
Got this error
Error: Failed to fetch plugin https://github.com/moust/cordova-plugin-videoplayer via registry.
Probably this is either a connection problem, or plugin spec is
incorrect.
Check your connection and plugin name/version/URL
Then I came to know about Streaming idea, it’s beautiful plugin because it support both for Android
and ios
, which is not in case of videoPlayer
plugin. Then i tried to execute the below code.
let options: StreamingVideoOptions = {
successCallback: () => {
console.log('Video played');
},
errorCallback: (e) => {
console.log(e);
},
orientation: 'landscape'
};
this.streamingMedia.playVideo('http://clips.vorwaerts-gmbh.de/VfE_html5.mp4',options);
This code is working perfect but not for every video.
2nd:- What i want to achieve?
I want the video will play and pause while i scroll down the screen.
Thank you.
If your Trying to play videos from an URL, then you can use the below code as well.
<video style="width: 100%;height: 200px;" src = "{{video_link}}#t=0.1" controls >
</video>
Is there any other way instead of using html video
tag to get native experience.
These two were 2 ways of achieving it
http://ionicframework.com/docs/native/video-player/84 or
http://ionicframework.com/docs/native/streaming-media/
But you have already tried them. My suggestion is choose streaming media plugin and convert the videos to a
common format that can be played by streaming media.
src = “{{video_link}}#t=0.1”
#t=0.1 part was my problem thanxs alot ,but can i know what #t=0.1 actually do
#t=0.1 will start the video from 0.1 sec during the load itself. Which appear like a thumbnail image for the video.
@vasanthb thanks for explanation you saved really alot of time of me
anyone faced issue in getting callback in iOS. I am not getting anycallback in ios. But android does.