Fix an exception on eventbus
requested to merge github/fork/Orange-OpenSource/VideoChunkReceived_Event_Exception into development
Created by: jeremco
Hello
The goal of this PR is to fix an exception on EventBus in the following scenario When onInitFragmentLoaded is called, chunk is saved in initCache and appended to buffer, an event is then triggered (modifying chunk by adding type property). If switchInitData is called, then chunk is extracted from initCache. Extracted chunk is appended to buffer and event is triggered -> exception because extracted chunk has already a 'type' property.
This commit fix the pb, because chunk is not modified by eventBus.
But maybe, would it be better if EventBus does not modify the paylod, but sends a event using format : event = { eventType : type, data : payload }. All callback could access the payload using e.data.
Jérémie