taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

[Ionic] Video Component or Video inside Card

Hello,

How can i add a video url inside card component or add video component?

(I want to show video posts like Instagram or Twitter)

Thanks,

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

[Ionic] Video Component or Video inside Card

Hello,

You may use HTML component and put video tag in it.
Something like:
1 HTML - http://prntscr.com/8r1ruc/direct
2 On "init" function use following JS code:
pre$scope.v_name = "helloworld";/pre
3 On button click - use following scope function:
http://prntscr.com/8r1s3q/direct
pre$scope.v_name = "myNewName";/pre
When tested - it was:
1 after page load: http://prntscr.com/8r1sip/direct
2 after button click: http://prntscr.com/8r1ssg/direct

You may also use "ng-src" attribute instead "src".
precode<iframe width="560" height="300" ng-src="{{ video }}" frameborder="0" allowfullscreen controls></iframe>/code/pre

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

[Ionic] Video Component or Video inside Card

Hi Evgene,

Thank you, that's what i was looking for.

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

[Ionic] Video Component or Video inside Card

Hi Evgene,

codeng-src="{{ video }}/code is not working. Console error:

Image

Thanks,

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

[Ionic] Video Component or Video inside Card

I searched for an solution on net.

"$sceDelegateProvider" can be the issue. For security reasons, angularjs throws error. How can i add to my app * whitelist.

Thanks,

taucher
Posts: 0
Joined: Fri Apr 17, 2015 6:06 am

[Ionic] Video Component or Video inside Card

Solved!

code
var $sce = Apperyio&#46;get( "$sce" );
$scope&#46;link = $sce&#46;trustAsResourceUrl(myvideourl);
/code

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

[Ionic] Video Component or Video inside Card

Thank you for the update!

ruma application
Posts: 0
Joined: Wed Jan 02, 2019 2:40 am

[Ionic] Video Component or Video inside Card

please do insert it into the app screenshot will be helpful

Return to “Issues”