问题
In my application I do the following steps:
- Publish audio only
- Unpublish
- Publish audio+video
- Unpublish
- Publish audio only
At stage 5 it fails with the following error:
index.js:460 OT.Publisher.onPublishingTimeoutonPublishingTimeout @ index.js:460(anonymous function) @ index.js:1472 index.js:332 OT.Publisher State Change Failed: 'Failed' cannot transition to 'MediaBound'stateChangeFailed @ index.js:332signalChangeFailed @ generate_simple_state_machine.js:38handleInvalidStateChanges @ generate_simple_state_machine.js:55set @ generate_simple_state_machine.js:65onPublishingTimeout @ index.js:477(anonymous function) @ index.js:1472 ot_error.js:341 OT.exception :: title: Unable to Publish (1500) msg: ICEWorkflow_exceptionHandler @ ot_error.js:341OTError.handleJsException @ ot_error.js:412onPublishingTimeout @ index.js:493(anonymous function) @ index.js:1472 handle.js:1071 1500 "Session.publish :: Could not publish in a reasonable amount of time"
I could reproduce this in all devices that were accessible to me at that time:
- Chrome on iMac
- Firefox on iMac
- Chrome on Macbook pro
- Chrome on
- Android 4.x
回答1:
I work at TokBox on the OpenTok JS SDK. I believe this is similar to a known bug we have recently fixed and will be shipped in the next version 2.9.
The known bug did not differentiate between audio/video, it was:
- Publish audio+video
- Unpublish
- Publish audio+video
- Unpublish
- Publish audio+video
And then failure.
I believe the fix for this would also apply to your problem (the same underlying problem causes both).
来源:https://stackoverflow.com/questions/38427760/publishing-fails-after-unpublishing