OK I have looked through the code any clear path for me to extend from the MediaTransportOverlay control. All I know is that there seems to be required methods that I must have in my subclass. Can anyone please provide any feedback on this. It is much appreciated. If I have missed anything in the documentation, please tell me where to look. Thank you.
Ok, finally getting some time to dig into this. This should work for you:
CODE
KONtx.control.KrmaCodeMediaTransportOverlay = new KONtx.Class({
Extends: KONtx.control.MediaTransportOverlay,
// overriding Media Transport Overlay's controls positioning
_createContent: function(){
this.parent();
this._createTitleBar();
},
_createTitleBar: function(){
this.element.title_bar = new KONtx.element.Text({
label: "Title Bar",
truncation: 'end',
styles: {
fontSize: '14px',
textAlign: 'center',
width: '25%',
},
}).appendTo(this);
},
});
Basically, when extending, if you're overriding any methods you should call the parent method or things will probably break. In your case they weren't because you had copied in the entire function body of the overridden method (btw, don't call this.parent()._createButtons(), etc.).
As you can see, I call the parent method and then whatever is different (i,e., the reason for overriding the parent method in the first place). If the order is important, then you will need to completely replace the method like you did in your example. Also, the extended class will inherit the ClassName (in this case 'ControlVideoTransportOverlay'), so you don't need to define one unless you're providing your own custom themes. The theme will be looked up using the 'ControlVideoTransportOverlay' class, which will map to an already-defined theme. So, this will get rid of your other error.
Lastly, you need to use the KONtx.element.Text control rather than the non-existent KONtx.control.Text control.
Hope this helps.