{"action":"opened","issue":{"url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/649","repository_url":"https://api.github.com/repos/katspaugh/wavesurfer.js","labels_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/649/labels{/name}","comments_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/649/comments","events_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/649/events","html_url":"https://github.com/katspaugh/wavesurfer.js/issues/649","id":135408062,"number":649,"title":"zoom but don't scroll while playing","user":{"login":"chrisvaughn","id":147524,"avatar_url":"https://avatars.githubusercontent.com/u/147524?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisvaughn","html_url":"https://github.com/chrisvaughn","followers_url":"https://api.github.com/users/chrisvaughn/followers","following_url":"https://api.github.com/users/chrisvaughn/following{/other_user}","gists_url":"https://api.github.com/users/chrisvaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisvaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisvaughn/subscriptions","organizations_url":"https://api.github.com/users/chrisvaughn/orgs","repos_url":"https://api.github.com/users/chrisvaughn/repos","events_url":"https://api.github.com/users/chrisvaughn/events{/privacy}","received_events_url":"https://api.github.com/users/chrisvaughn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-22T12:51:53Z","updated_at":"2016-02-22T12:51:53Z","closed_at":null,"body":"Thanks for taking the time read this.  The library is fantastic.\r\n\r\nFor my application I use the regions plugin for the purpose of highlighting a section of the wave. I want to show the region centered and play the region without scrolling. In order to achieve this it feels like I'm fighting the library a bit. I have to turn on scrollParent: true when I initialize (so the wave doesn't overrun the container) but right before I play I have to ```wavesurfer.params.scrollParent = false;``` instead of using toggleScroll() because toggleScroll redraws the wave. Below are what I believe are the relevant sections of code for what I've describing here.  This code accomplishes what I'm wanting when using the WebAudio backend.  \r\n\r\nA few questions:\r\n 1. Is there a better way to accomplish this? I feel like I might be missing something obvious.\r\n 2. since I never really want scrolling should I be able to do this without ever turning scrollParent on?\r\n 3. This same code doesn't work if I set the backend to 'MediaElement'.  I'm attempting to use MediaElement to get around the memory issues with some browsers and WebAudio like #77.  When using the MediaElement backend the region is not visible on the screen. I found that when I comment out the ```wavesurfer.params.scrollParent = false;``` line the region is centered as expect but this means that it scrolls during playback.  Any advice or direction on where to head with getting my code to do what I want and have it work with both backends? \r\n\r\n```javascript\r\nvar options = {\r\n  container: element,\r\n  pixelRatio: 1,\r\n  fillParent: false,\r\n  normalize: true,\r\n  scrollParent: true,\r\n  hideScrollbar: true\r\n}\r\n\r\nvar wavesurfer = WaveSurfer.create(options);\r\n\r\nwavesurfer.on('ready', function () {\r\n  start = 4.621;\r\n  end = 8.243;\r\n\r\n  // figure out how many pixels per second to show to fit whole region on screen\r\n  var audioLength = (end - start) + 5;\r\n  var pixPerSecond = $element.width() / audioLength;\r\n\r\n  // figure out where the center of the region will be\r\n  var centerOfRegion = (start + (end - start)/2)/wavesurfer.getDuration();\r\n\r\n  // show the proper amount of the wave and scroll to it\r\n  wavesurfer.zoom(pixPerSecond);\r\n  wavesurfer.seekAndCenter(centerOfRegion);\r\n\r\n  //add a region\r\n  var region = wavesurfer.addRegion({\r\n    'start':start,\r\n    'end':end,\r\n    'data':{},\r\n    'color':'rgba(167,210,229,0.3)'\r\n  });\r\n\r\n  // we don't want to scroll while playing so disable\r\n  // using toggleScroll redraws the wave and messes up centering\r\n  wavesurfer.params.scrollParent = false;\r\n  region.play();\r\n}\r\n```"}}