()
| 65 | } |
| 66 | |
| 67 | private async initialize() { |
| 68 | // this goes first to prevent multiple calls to initialize |
| 69 | if (this.initialized) { |
| 70 | return; |
| 71 | } |
| 72 | this.initialized = true; |
| 73 | |
| 74 | // try to initialize each cast destination |
| 75 | for (const castDestination of this.castDestinations) { |
| 76 | const destAvailable = await castDestination.initialize(); |
| 77 | if (destAvailable) { |
| 78 | this.availableDestinations.push(castDestination); |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | // monitor all cast destinations for changes |
| 84 | // we want to make sure only one session is active at a time |
no test coverage detected