Calling this function will end up generating an 'unavailble' event which will probably be mis-interpreted by apps.  I don't think we need both the 'unavailable' event and the 'upgradestart' event.  I recommend taht you just sent media.state manually here without calling the function.