{"action":"created","issue":{"url":"https://api.github.com/repos/bbc/peaks.js/issues/162","repository_url":"https://api.github.com/repos/bbc/peaks.js","labels_url":"https://api.github.com/repos/bbc/peaks.js/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/bbc/peaks.js/issues/162/comments","events_url":"https://api.github.com/repos/bbc/peaks.js/issues/162/events","html_url":"https://github.com/bbc/peaks.js/issues/162","id":191864606,"number":162,"title":"Prevent default seek behavior","user":{"login":"Foreweed","id":20836382,"avatar_url":"https://avatars.githubusercontent.com/u/20836382?v=3","gravatar_id":"","url":"https://api.github.com/users/Foreweed","html_url":"https://github.com/Foreweed","followers_url":"https://api.github.com/users/Foreweed/followers","following_url":"https://api.github.com/users/Foreweed/following{/other_user}","gists_url":"https://api.github.com/users/Foreweed/gists{/gist_id}","starred_url":"https://api.github.com/users/Foreweed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foreweed/subscriptions","organizations_url":"https://api.github.com/users/Foreweed/orgs","repos_url":"https://api.github.com/users/Foreweed/repos","events_url":"https://api.github.com/users/Foreweed/events{/privacy}","received_events_url":"https://api.github.com/users/Foreweed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-27T14:36:50Z","updated_at":"2016-12-19T13:20:29Z","closed_at":null,"body":"Hello,\r\n\r\nFirst I want to thank you for the great job you did with this project.\r\nI have a question for you: I want to prevent the user from seeking overview or zoomview on selected segments. I've seen your events user_seek.overview and user_seek.zoomview, and I wonder: are those events called before or after actually moving the cursor to the clicked position? And if it's before, is there a way to prevent the default behavior (which consists in moving the cursor to the clicked position)?"},"comment":{"url":"https://api.github.com/repos/bbc/peaks.js/issues/comments/267962299","html_url":"https://github.com/bbc/peaks.js/issues/162#issuecomment-267962299","issue_url":"https://api.github.com/repos/bbc/peaks.js/issues/162","id":267962299,"user":{"login":"oncletom","id":138627,"avatar_url":"https://avatars.githubusercontent.com/u/138627?v=3","gravatar_id":"","url":"https://api.github.com/users/oncletom","html_url":"https://github.com/oncletom","followers_url":"https://api.github.com/users/oncletom/followers","following_url":"https://api.github.com/users/oncletom/following{/other_user}","gists_url":"https://api.github.com/users/oncletom/gists{/gist_id}","starred_url":"https://api.github.com/users/oncletom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oncletom/subscriptions","organizations_url":"https://api.github.com/users/oncletom/orgs","repos_url":"https://api.github.com/users/oncletom/repos","events_url":"https://api.github.com/users/oncletom/events{/privacy}","received_events_url":"https://api.github.com/users/oncletom/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T13:20:29Z","updated_at":"2016-12-19T13:20:29Z","body":"@Foreweed maybe you can try to intercept the click and user behaviour outside of peaks to do so.\r\n\r\nIf we move the scrub/click event emission, at least it would enable the user to possibly do a `preventDefault()` to cancel\r\n\r\n```js\r\npeaks.on('segment.click', (event, segment) => {\r\n  if (segment.metadata.protected === true) {\r\n    event.preventDefault();\r\n  }\r\n});\r\n```\r\n\r\nThe same thinking should happen for scrubbing — that might be more complex to do it right.\r\n\r\nMaybe a simpler approach would to visually make the segments \"unmodifiable\", let the user click on them and have your UI to say they cannot do it because of specific reason, with links to jump to the next editable timestamp."}}
{"actor":{"display_login":"oncletom"}}