ng-wistia-components.js
function (e, data) {
                ctrl.coreWistia.setError(); //clear any previous errors

                data
                  .submit()
                  .then(function (result, textStatus, jqXHR) {
                    ctrl.coreWistia.playVideo(result.hashed_id);
                  })
                  .catch(function (jqXHR, textStatus, errorThrown) {
                    $timeout(function() {
                      ctrl.coreWistia.setError('WistiaError: ' + jqXHR.responseJSON ? jqXHR.responseJSON.error : errorThrown);
                    });
                  })
                ;
              }
function (e, data) {
                ctrl.coreWistia.setError(); //clear any previous errors

                data
                  .submit()
                  .then(function (result, textStatus, jqXHR) {
                    ctrl.coreWistia.playVideo(result.hashed_id);
                  })
                  .catch(function (jqXHR, textStatus, errorThrown) {
                    $timeout(function() {
                      ctrl.coreWistia.setError('WistiaError: ' + jqXHR.responseJSON ? jqXHR.responseJSON.error : errorThrown);
                    });
                  })
                ;
              }
function ( e , data ) { ctrl . coreWistia . setError ( ) ; //clear any previous errors data . submit ( ) . then ( function ( result , textStatus , jqXHR ) { ctrl . coreWistia . playVideo ( result . hashed_id ) ; } ) . catch ( function ( jqXHR , textStatus , errorThrown ) { $timeout ( function ( ) { ctrl . coreWistia . setError ( 'WistiaError: ' + jqXHR . responseJSON ? jqXHR . responseJSON . error : errorThrown ) ; } ) ; } ) ; }
Called when a file is added for uploading
Called when a file is added for uploading