Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
defaults: _.extend(_.result(this, 'widgets.DOMWidgetModel.prototype.defaults'), {
_model_name: 'VideoModel',
_model_module: module_name,
_model_module_version: module_version,
_view_name: 'VideoView',
_view_module: module_name,
_view_module_version: module_version,
})
});
//-----------------------------------------------
// Widget View renders the model to the DOM
var TimeCodeView = widgets_controls.HTMLView.extend({
// https://codereview.stackexchange.com/questions/49524/updating-single-view-on-change-of-a-model-in-backbone
render: function() {
this.listenTo(this.model, 'change:timecode', this.timecode_changed);
TimeCodeView.__super__.render.apply(this);
this.timecode_changed();
this.update();
return this;
},
timecode_changed: function() {
var time_base = this.model.get('timebase');
var t = this.model.get('timecode'); // current video time in seconds