Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review #103

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down Expand Up @@ -74,4 +74,3 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

19 changes: 9 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Bug report
about: Create a report to help us improve
title: "[Bug] Describe your issue here"
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
For general information on how to use this module, getting started setting up, or other questions, please visit the MagicMirror² Forum at https://forum.magicmirror.builders. To make sure the module developer is aware of your issue, please tag '@shbatm' on your forum post.
For general information on how to use this module, getting started setting up, or other questions, please visit the MagicMirror² Forum at <https://forum.magicmirror.builders>. To make sure the module developer is aware of your issue, please tag '@shbatm' on your forum post.

If you are having an actual issue, please include a clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,17 +24,16 @@ A clear and concise description of what you expected to happen.

**Configuration**
Please include:
- The configuration section for this module
- The configuration section for any affected modules

* It may be easier to post these in a [Gist](https://gist.github.com) and post the link here.
- The configuration section for this module
- The configuration section for any affected modules

- It may be easier to post these in a [Gist](https://gist.github.com) and post the link here.

**Logs**
If applicable, please include the relevant logs to help explain your problem.
+ From the console or `~/.pm2/logs/`
+ From the web console using DevTools (<key>Ctrl</key>+<key>Shift</key>+<key>I</key>)
If applicable, please include the relevant logs to help explain your problem. + From the console or `~/.pm2/logs/` + From the web console using DevTools (<key>Ctrl</key>+<key>Shift</key>+<key>I</key>)

**Additional context**
Add any other context about the problem here.

If you are not comfortable posting the logs or configuration on a public place, you may also send @shbatm a private chat on the [MagicMirror² Forum](https://forum.magicmirror.builders) or send an e-mail to [email protected]. E-mails asking general questions or without an accompanying Issue will not be answered.
If you are not comfortable posting the logs or configuration on a public place, you may also send @shbatm a private chat on the [MagicMirror² Forum](https://forum.magicmirror.builders) or send an e-mail to <[email protected]>. E-mails asking general questions or without an accompanying Issue will not be answered.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Feature request
about: Suggest an idea for this project
title: "[FEATURE REQUEST] Your feature request idea here"
labels: enhancement
assignees: ''

assignees: ""
---

For general information on how to use this module, getting started setting up, or other questions, please visit the MagicMirror² Forum at https://forum.magicmirror.builders. To make sure the module developer is aware of your issue, please tag '@shbatm' on your forum post.
Expand Down
16 changes: 8 additions & 8 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## Support for this MagicMirror² Module

For general information on how to use this module, getting started setting up, or other questions, please visit the MagicMirror² Forum at https://forum.magicmirror.builders.
For general information on how to use this module, getting started setting up, or other questions, please visit the MagicMirror² Forum at <https://forum.magicmirror.builders>.

To make sure the module developer is aware of your issue, please tag '@shbatm' on your forum post

If you experience errors with this module, or have a suggestion for improvements, please raise an issue by clicking the ISSUE button here in the Repository. When raising an issue, please include:
If you experience errors with this module, or have a suggestion for improvements, please raise an issue by clicking the ISSUE button here in the Repository. When raising an issue, please include:

- The configuration section for this module
- The configuration section for any affected modules
- Relavent logs:
+ From the console or `~/.pm2/logs/`
+ From the web console using DevTools (<key>Ctrl</key>+<key>Shift</key>+<key>I</key>)
- The configuration section for this module
- The configuration section for any affected modules
- Relavent logs:
- From the console or `~/.pm2/logs/`
- From the web console using DevTools (<key>Ctrl</key>+<key>Shift</key>+<key>I</key>)

This information should be posted directly in the Issue, or in a Gist (https://gist.github.com). If you are not comfortable posting this in a public place, you may send a private chat on the MagicMirror forum, or e-mail the relavent info to [email protected].
This information should be posted directly in the Issue, or in a Gist (<https://gist.github.com>). If you are not comfortable posting this in a public place, you may send a private chat on the MagicMirror forum, or e-mail the relavent info to <[email protected]>.
51 changes: 25 additions & 26 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,31 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: '38 8 * * *'
workflow_dispatch:
schedule:
- cron: "38 8 * * *"
workflow_dispatch:

jobs:
stale:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-pr-message: >
This PR has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-issue-label: 'stale'
stale-pr-label: 'stale'
days-before-stale: 60
days-before-close: 14
exempt-issue-labels: 'pinned,security'
steps:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-pr-message: >
This PR has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-issue-label: "stale"
stale-pr-label: "stale"
days-before-stale: 60
days-before-close: 14
exempt-issue-labels: "pinned,security"
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public/bootstrap.min.css
public/jquery-3.2.1.min.js
scripts/jsmpeg.min.js
scripts/onexit.js
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"trailingComma": "none"
}
71 changes: 36 additions & 35 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,87 @@
## :warning: Refer to GitHub Releases page for Change Logs post [2.0.2-dev]
# :warning: Refer to GitHub Releases page for Change Logs post [2.0.2-dev]

## [2.0.2-dev] - Attempted fix for OMXPlayer with OpenGL (Fake KMS) enabled

Changed:
* Added "--no-osd" command line switch to omxplayer command. Per [this thread](https://www.raspberrypi.org/forums/viewtopic.php?t=159853), "omxplayer uses OpenVG for subtitles and status messsages which is not compatible with [the OpenGL (Fake KMS)] driver."

- Added "--no-osd" command line switch to omxplayer command. Per [this thread](https://www.raspberrypi.org/forums/viewtopic.php?t=159853), "omxplayer uses OpenVG for subtitles and status messsages which is not compatible with [the OpenGL (Fake KMS)] driver."

## [2.0.1-dev] - Major OMX Bugfixes

Changed:
* App closing now spawns a new process to actually kill the OMX streams, it was getting cut off in the middle of closing everything due to it being an async process.
* Wait for DOM to be shown before calling to start the streams--this was causing the Fullscreen on Resume problems.
* Only start one stream at a time if we're in RotateStreams mode
* Can jump to a specific stream in RotateStreams mode using notifications
* Fixed and cleaned up all notifications and control from other modules
* Fixed broken key bindings after MMM-KeyBindings upgrade
* Fixed issue where module was trying to connect to PM2 while it was already connected (e.g. stop stream 1 and start stream 2 back to back).

- App closing now spawns a new process to actually kill the OMX streams, it was getting cut off in the middle of closing everything due to it being an async process.
- Wait for DOM to be shown before calling to start the streams--this was causing the Fullscreen on Resume problems.
- Only start one stream at a time if we're in RotateStreams mode
- Can jump to a specific stream in RotateStreams mode using notifications
- Fixed and cleaned up all notifications and control from other modules
- Fixed broken key bindings after MMM-KeyBindings upgrade
- Fixed issue where module was trying to connect to PM2 while it was already connected (e.g. stop stream 1 and start stream 2 back to back).

## [2.0.0] - Add VLC Streaming Support

Added:

* VLC Window Overlay support added. Use `localPlayer: 'vlc',` in your module configuration.
* Module-wide debug option added for more verbose output: `debug: true,`
- VLC Window Overlay support added. Use `localPlayer: 'vlc',` in your module configuration.
- Module-wide debug option added for more verbose output: `debug: true,`

Changed:

* `shutdownDelay` parameter moved from the individual stream config sections to the main module config so it only has to be provided once. It has also changed from milliseconds to seconds. Warning has been added if the timeout is less time than it takes to make it through the loop of streams (causes unnecessary restarts).
* `hideFfmpegOutput` configuration option removed from stream config in favor of global `debug` module option.
* Fixed bug where transition timer was not properly reset after module resume.
* Added `hwAccel` stream option for `ffmpeg` to attempt to use hardware accelerated decoding. Encoding still uses CPU unfortunatly.
- You must update the node-rtsp-stream-es6 package too. This is most easily done by deleting your node_modules folder and re-running `npm install` on the module.
* `RTSP-PLAY` notification now accepts an object `{ stream: "streamX", stopOthers: true }` which will stop other streams before starting the new stream.
- `shutdownDelay` parameter moved from the individual stream config sections to the main module config so it only has to be provided once. It has also changed from milliseconds to seconds. Warning has been added if the timeout is less time than it takes to make it through the loop of streams (causes unnecessary restarts).
- `hideFfmpegOutput` configuration option removed from stream config in favor of global `debug` module option.
- Fixed bug where transition timer was not properly reset after module resume.
- Added `hwAccel` stream option for `ffmpeg` to attempt to use hardware accelerated decoding. Encoding still uses CPU unfortunatly.
- You must update the node-rtsp-stream-es6 package too. This is most easily done by deleting your node_modules folder and re-running `npm install` on the module.
- `RTSP-PLAY` notification now accepts an object `{ stream: "streamX", stopOthers: true }` which will stop other streams before starting the new stream.

## [1.2.2] - Auto-restart OMX Stream every X hours (Partially addresses #29)

Changes:

* Added config option to schedule automatic restarts of the OMX streams.

- Added config option to schedule automatic restarts of the OMX streams.

## [1.2.1] - Custom video window parameters

Changes:

* OMX streams can be started via notification in a custom-sized window.
- OMX streams can be started via notification in a custom-sized window.

Fixes:

* Bug fixes for ffmpegPort and absPosition settings.
- Bug fixes for ffmpegPort and absPosition settings.

## [1.2.0] - Use PM2 to control OMX Streams

Changes:

* OMXPlayer streams are started using PM2 to allow auto-restart if the stream closes
* Better shutdown handling if the "Graceful Shutdown" patch is installed.
* Added Absolute Position option to override automatic detection of where to show the video.
* Configuration Builder now included. See instructions in README.md
- OMXPlayer streams are started using PM2 to allow auto-restart if the stream closes
- Better shutdown handling if the "Graceful Shutdown" patch is installed.
- Added Absolute Position option to override automatic detection of where to show the video.
- Configuration Builder now included. See instructions in README.md

Fixes:

* Various minor bug fixes and code cleanup
* `port` setting changed to `ffmpegPort` for clarity
- Various minor bug fixes and code cleanup
- `port` setting changed to `ffmpegPort` for clarity

## [1.1.1] - Added OMXPlayer Offset config option

* Added `moduleOffset` config option. On some displays, the method used to find the location to draw the video does not properly line up with the screen. Entering a pixel value will shift the video location by that amount.
- Added `moduleOffset` config option. On some displays, the method used to find the location to draw the video does not properly line up with the screen. Entering a pixel value will shift the video location by that amount.

## [1.1.0] - Hardware Acceleration w/ OMXPlayer

Changes:

* Option to use OMXPlayer on main server's screen to use hardware accelerated video playback. OMXPlayer will draw over top of browser window.
* Option for fullscreen playback with OMXPlayer (double-click or MMM-KeyBindings longpress play)
* Full screen mode can use a different "HD" stream by setting `hdurl` in stream config.
* Updated MMM-KeyBindings calls to match refactored functions from that module
* Implemented independent control for server and remote browser screens
- Option to use OMXPlayer on main server's screen to use hardware accelerated video playback. OMXPlayer will draw over top of browser window.
- Option for fullscreen playback with OMXPlayer (double-click or MMM-KeyBindings longpress play)
- Full screen mode can use a different "HD" stream by setting `hdurl` in stream config.
- Updated MMM-KeyBindings calls to match refactored functions from that module
- Implemented independent control for server and remote browser screens

Fixes:

* JSMpeg throws error "Failed to get WebGL context." - Using option in JSMpeg call to disable WebGL.
* Audio is ignored from the streams to prevent interference with other modules.
- JSMpeg throws error "Failed to get WebGL context." - Using option in JSMpeg call to disable WebGL.
- Audio is ignored from the streams to prevent interference with other modules.

## [1.0.2] - Fixes #10 - No playback on Monitor resume from suspend

Expand Down
Loading