I'm trying to change an input field's value when a video loads. Here's the relevant code:

This works:

```
$scope.stopRecording = function () {
    // value of the input changes as expected
    $scope.videoEndPos = 10;
};

```

This doesn't

```
$scope.stopRecording = function () {

    video.onloadedmetadata = function() {

        $scope.videoEndPos = 10;

        // the value of the input does not change, but this still correctly outputs 10
        console.log($scope.videoEndPos);
    };

};

```

In an effort to keep this short I left out some crucial video stuff there, but that part is working and the onloadedmetadata is firing properly, so its something funky with angular and the input. However, let me know if you suspect I've left out some relevant code.