Shaka Player Embedded
media_error.cc
Go to the documentation of this file.
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "src/js/mse/media_error.h"
16 
17 namespace shaka {
18 namespace js {
19 namespace mse {
20 
22  : code(code), message(message) {}
23 // \cond Doxygen_Skip
24 MediaError::~MediaError() {}
25 // \endcond Doxygen_Skip
26 
27 
29  AddConstant("MEDIA_ERR_ABORTED", MEDIA_ERR_ABORTED);
30  AddConstant("MEDIA_ERR_NETWORK", MEDIA_ERR_NETWORK);
31  AddConstant("MEDIA_ERR_DECODE", MEDIA_ERR_DECODE);
32  AddConstant("MEDIA_ERR_SRC_NOT_SUPPORTED", MEDIA_ERR_SRC_NOT_SUPPORTED);
33 
34  AddReadOnlyProperty("code", &MediaError::code);
35  AddReadOnlyProperty("message", &MediaError::message);
36 }
37 
38 } // namespace mse
39 } // namespace js
40 } // namespace shaka
MediaError(MediaErrorCode code, const std::string &message)
Definition: media_error.cc:21
const std::string message
Definition: media_error.h:46
const MediaErrorCode code
Definition: media_error.h:45
const char * message