Page 1 of 1

[Ionic] Video Component or Video inside Card

Posted: Wed Mar 23, 2016 9:06 am
by taucher

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,


[Ionic] Video Component or Video inside Card

Posted: Wed Mar 23, 2016 1:49 pm
by Evgene Karachevtsev

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


[Ionic] Video Component or Video inside Card

Posted: Wed Mar 23, 2016 2:02 pm
by taucher

Hi Evgene,

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


[Ionic] Video Component or Video inside Card

Posted: Mon Mar 28, 2016 3:02 pm
by taucher

Hi Evgene,

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

Image

Thanks,


[Ionic] Video Component or Video inside Card

Posted: Mon Mar 28, 2016 4:06 pm
by taucher

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,


[Ionic] Video Component or Video inside Card

Posted: Mon Mar 28, 2016 4:22 pm
by taucher

Solved!

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


[Ionic] Video Component or Video inside Card

Posted: Thu Mar 31, 2016 8:46 am
by Illya Stepanov

Thank you for the update!


[Ionic] Video Component or Video inside Card

Posted: Wed Jan 02, 2019 2:40 am
by ruma application

please do insert it into the app screenshot will be helpful