Closed kittsville closed 8 years ago
I'll use this issue for implementing error handling as gif/sound plugin matching failure is just a small subset of this larger issue.
TheForm now handles failure to find media plugins without a JS exception and generates an error message on the page. This now opens the door to plugins reporting failure via GifSound.gifFailed() and gifSound.soundFailed() such as a YouTube embed error or an image 404ing.
I might as well give that a go now.
Both YTPlugin video error handling and GifPlugin error handling have been implemented. I just forgot to reference them from the commits.
Only remaining plugin is GifvPlugin. I'll close the issue once that's done as all future plugins can implement error handling as and when they're created.
Added in 5574f7f784348cc4c52b927adf67d2d0c8b3c0d8
Currently an exception is generated if the gif or sound doesn't match any media plugin. This should be handled better with a visible error and recovery that allows for different URLs to be entered afterwards.
The form's post-submission processing will need changing so that gif/sound embedding only begins once both media types have been matched to existing plugins.