Odoo Help

1

How to display video In the website ?

By
Niyas Raphy
on 7/16/17, 5:56 AM 1,138 views

I have got video in the backend which is saved as an attachment, now i want to display the video in the website . How can i achieve it ?

Now i am possible to display the video in the following ways , but not from the one saved as attachments.

<iframe src="//www.youtube.com/embed/vxIj3JKEGvE" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="/web_school/static/src/img/play_video.mp4"></iframe>
</div>
2
--Niyas Raphy--

Odoo Techno Functionalist @ Cybrosys Techno Solutions

Graduation : B-Tech in Computer Science & Engineering from Calicut University (2012 - 2016)


Feel free to contact :  niyasraphyk@gmail.com

Niyas Raphy
On 7/19/17, 12:21 AM

Hi,

Got the solution like this.

Attached a video in the backend as attachment, then i accessed the the attachment from the controller and passed/ rendered the binary value of the video to the template. And in the template, added the code like this.

<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" t-att-src="'data:video/mp4;base64,' + str(video_material)"></iframe>
</div>


Thanks

1

Shameem Babu @ iWesabe

--Shameem Babu @ iWesabe--
GLOBAL CREATIVE CONCEPTS TECH CO LTD
http://www.iwesabe.com
1257
| 6 3 6
KHOBAR, Saudi Arabia
--Shameem Babu @ iWesabe--

  

 iWesabe - ODOO ERP IMPLEMENTATION & CUSTOMIZATION SAUDI ARABIA.



For Queries :  shameem@iwesabe.com

Activities     :    Youtube

                           Stackoverflow 

Experience

           iWesabe                                  ◉

           Axon Communications        ❍

           Cybrosys Technologies        ❍


Shameem Babu @ iWesabe
On 7/17/17, 9:29 AM

Dear Niyas, I am not sure !!

You attach your file to a binary field. That will be base64.

Then try to display video using base64. 

See the example

Thanks shameem

Niyas Raphy
on 7/19/17, 12:22 AM
0
Lucas Huber
On 7/17/17, 8:59 AM

I think this is not possible so far. Would need a new module. 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 7/16/17, 5:56 AM
Seen: 1138 times
Last updated: 3/14/18, 12:51 AM