× Requests and support related to jBackend.

Jbackend and Template Ionic Material

  • alphaa
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 9 months ago - 8 years 9 months ago #5109 by alphaa
Replied by alphaa on topic Jbackend and Template Ionic Material
I have an issue. I can t showing youtube from json .
Attachments:
Last edit: 8 years 9 months ago by alphaa.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #5110 by admin
Replied by admin on topic Jbackend and Template Ionic Material
Can you post the piece of json response and the html snippet to bind it?

Please Log in or Create an account to join the conversation.

  • alphaa
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 9 months ago #5111 by alphaa
Replied by alphaa on topic Jbackend and Template Ionic Material
JSON "content":
"\r\n<script async=\"async\" src=\"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"></script>\r\n<p>   adda, aldmsfd , sdsfdhu, sdslfdjsfp , sdfsudsb  </p>\r\n<p><iframe src=\"//www.youtube.com/embed/4uZrrZ5uIN4\" width=\"425\" height=\"350\"></iframe></p> \r\n<div class=\"eliadunit\" style=\"text-align:center;\">\r\n\r\n<!-- pour mobile -->\r\n<ins class=\"adsbygoogle\"\r\n\tstyle=\"display:inline-block;width:300px;height:250px\"\r\n\tdata-ad-client=\"ca-pub-2643651352973802\"\r\n\tdata-ad-slot=\"5945834378\"\r\n\tdata-ad-type=\"image\"></ins>\r\n<script>\r\n(adsbygoogle = window.adsbygoogle || []).push({});\r\n</script>\r\n</div class=\"eliadunit\">"

HTML content :
 <div class="item item-body" >
      <img class="full-image" ng-src="{{item.images.imageLarge}}">
	   <div  class="video-container" ng-bind-html="item.content | unsafe"></div>
</div>

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #5112 by admin
Replied by admin on topic Jbackend and Template Ionic Material
As you can see from the JSON response the URL doesn't include the protocol:
//www.youtube.com/embed/4uZrrZ5uIN4\

So the app adds file://. You should arrange a solution to convert this with protocol (server side or client side).
https://www.youtube.com/embed/4uZrrZ5uIN4/

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • alphaa
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 9 months ago #5115 by alphaa
Replied by alphaa on topic Jbackend and Template Ionic Material
Exactly how to do this ? i have upload the plugin whitelist but nothing.
do you have an idea please ?

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #5117 by admin
Replied by admin on topic Jbackend and Template Ionic Material
This cannot be fixed with withelist plugin. You can try to force the full URL on the sever side (it depends on the extension you are using, K2, com_content, etc.). Another solution could be to manipulate the field in the controller (or in the service/model) with a regular expression.

Please Log in or Create an account to join the conversation.

Time to create page: 0.189 seconds