Reading HTML property programmatically (video duration)

Hello fellow Ioners

In a page I load a video HTML component, and I would like read its duration property.

Currently I’m doing it this way:

<video controls width="100%" #myvideo>
            <source src="{{i.url}}" type="video/mp4">
            Your mobile does not support the video tag.
        </video>
        <p>{{_setDuration(myvideo.duration)}}</p>

I use a dummy html element element to force invoking a class method to read the duration property value.

It works, but I’m guessing I’m doing it ‘not-correctly’. Is there a way to access directly an HTML element attribute?

Thank you
Costas