{"action":"created","issue":{"url":"https://api.github.com/repos/2fdevs/videogular/issues/49","labels_url":"https://api.github.com/repos/2fdevs/videogular/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/2fdevs/videogular/issues/49/comments","events_url":"https://api.github.com/repos/2fdevs/videogular/issues/49/events","html_url":"https://github.com/2fdevs/videogular/issues/49","id":30675058,"number":49,"title":"Seeking video returns \"Error: An attempt was made to use an object that is not, or is no longer, usable.\"","user":{"login":"5erg","id":3194073,"avatar_url":"https://avatars.githubusercontent.com/u/3194073?v=3","gravatar_id":"","url":"https://api.github.com/users/5erg","html_url":"https://github.com/5erg","followers_url":"https://api.github.com/users/5erg/followers","following_url":"https://api.github.com/users/5erg/following{/other_user}","gists_url":"https://api.github.com/users/5erg/gists{/gist_id}","starred_url":"https://api.github.com/users/5erg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/5erg/subscriptions","organizations_url":"https://api.github.com/users/5erg/orgs","repos_url":"https://api.github.com/users/5erg/repos","events_url":"https://api.github.com/users/5erg/events{/privacy}","received_events_url":"https://api.github.com/users/5erg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/2fdevs/videogular/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-04-02T10:11:47Z","updated_at":"2015-05-19T13:13:20Z","closed_at":"2014-04-02T11:48:31Z","body":"If video has not yet been played, the \"Error: An attempt was made to use an object that is not, or is no longer, usable.\" is fired for the line that calls seekTime() function.\r\n\r\nHowever, if video is played, either through click on play control / overlay or through play() API call first and then call seekTime(), videogular works as expected - seeks to the position specified in seconds.\r\n\r\nI make the seekTime() call from a directive, here's the main snippet:\r\n```js\r\n$scope.click = function($mark) {\r\n                if ($scope.videoScope.isPlayerReady()) {\r\n                    $scope.videoScope.play();\r\n                    $scope.videoScope.seekTime($mark);\r\n                }\r\n```\r\nI used play() here to make the player play first and then seek, thinking problem was that video had to be playing before seeking, but no. Video starts playing, then the error is raised, _however_, if I click again, then the video will seek to the specified position as expected.\r\n\r\nThe videoScope ref is taken from the OnPlayerReady event and binded to the directive.\r\n```js\r\n$scope.onPlayerReady = function(API) {\r\n            $scope.videoApi = API;\r\n        };\r\n```"},"comment":{"url":"https://api.github.com/repos/2fdevs/videogular/issues/comments/103480860","html_url":"https://github.com/2fdevs/videogular/issues/49#issuecomment-103480860","issue_url":"https://api.github.com/repos/2fdevs/videogular/issues/49","id":103480860,"user":{"login":"2fdevs","id":4632089,"avatar_url":"https://avatars.githubusercontent.com/u/4632089?v=3","gravatar_id":"","url":"https://api.github.com/users/2fdevs","html_url":"https://github.com/2fdevs","followers_url":"https://api.github.com/users/2fdevs/followers","following_url":"https://api.github.com/users/2fdevs/following{/other_user}","gists_url":"https://api.github.com/users/2fdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/2fdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2fdevs/subscriptions","organizations_url":"https://api.github.com/users/2fdevs/orgs","repos_url":"https://api.github.com/users/2fdevs/repos","events_url":"https://api.github.com/users/2fdevs/events{/privacy}","received_events_url":"https://api.github.com/users/2fdevs/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T13:13:20Z","updated_at":"2015-05-19T13:13:20Z","body":"No problem! :)"}}