clojurescript html5 media elements

clojure html5-video clojurescript

322 просмотра

1 ответ

I'm new to clojurescript/reagent and am testing out ideas for a media display app. At the moment I'm having problems with a few more specific elements of including html5 media components on my page and using their full features.

Example - including #t=10,10 at the end of a video source string(referenced here https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video) will sometimes work but only take the end range value. Same video element - using any attributes that aren't true/false will break compilation. e.g :preload auto doesn't work whereas :fullscreen false does.

Is there a clojurescript way to handle these elements or is this more js interop territory?

Автор: txesc Источник Размещён: 08.11.2019 11:06

Ответы (1)


0 плюса

Since clojurescript will be compiled to JS eventually. Everything JS can do..clojurescript could do it equally well.

your "sometime work" issues are related to the nature of ReactJS ( Reagent is a wrapper of ReactJS ). Generally, you need to obtain the dom node of video tag to use most of the video tag's features.

Related issues

Video displayed in ReactJS component not updating

Example

Source Code Example of how to interact with video tag under ReactJS.

https://github.com/eisneim/react-html5-video/blob/master/src/Video.js

You should provide the minimum case to produce the problem, so others could help you.

Автор: ka yu Lai Размещён: 24.08.2016 04:34
Вопросы из категории :
32x32