setup-your-mac / Setup-Your-Mac

Setup Your Mac aims to simplify initial device configuration by leveraging swiftDialog and Jamf Pro Policy Custom Events to allow end-users to self-complete Mac setup post-enrollment.
https://snelson.us/sym
MIT License
231 stars 52 forks source link

Having an option to have Video play during Policy installation #113

Closed gabemarcelino closed 1 month ago

gabemarcelino commented 9 months ago

Note: While all requests are welcome, finding available cycles to custom-code a feature we won't use in our production environment is always challenging.

Is your feature request related to a problem? Please describe. A clear, concise description of the problem. (i.e., I'm frustrated when ...)

Video feature is a great option but would be better if the video plays while the policy installs.

Describe the solution you'd like A clear, concise description of what you want to happen.

Right now when the video option it sets it plays the video and holds up the policy arrays. Would be nice to play while the policy runs in the background.

Describe alternatives you've considered A clear, concise description of any alternative solutions or features you've considered.

I have a work. around right now and posted on slack here: https://macadmins.slack.com/archives/C04FRRN3281/p1695324059300509?thread_ts=1695245243.074309&cid=C04FRRN3281

Figured a work around for folks looking for a way, wrote a short script just to open swift dialog video added to a policy and call that policy in the beginning. the trick was to add & to the end of the command and that should just run and close the script and policy to move to the next one

#!/bin/zsh dialogBinary="/usr/local/bin/dialog" "$dialogBinary" --ontop --movable --quitkey x --video youtubeid=XXXXXXXX --autoplay --title "Whatever you want" --videocaption "What ever you want" --button1text "Close Video" --big &

Additional context Add any other context or screenshots about the feature request here.

You guys are awesome and this works great for our setup and a DEPNotify alternative!

GadgetGeekNI commented 9 months ago

How could one easily incorporate this into the overall script outside of a policy? (A tool feature)

For example, a bash variable for 'playVideoWhileInstall' etc. Could we make this part of the video workflow as an optional true/false flag?

Also what is the behaviour after the video ends? Does it return to the installation screen or sit waiting to be replayed / close button clicked?

gabemarcelino commented 9 months ago

How could one easily incorporate this into the overall script outside of a policy? (A tool feature)

I am thinking since SwiftDialog has the feature when its full screen another dialog can come up, so as long as it comes up after the policy array starts I think this can pop up

For example, a bash variable for 'playVideoWhileInstall' etc. Could we make this part of the video workflow as an optional true/false flag?

My guess if there is a flag would have to put an if statement somewhere after the first dialog for policy array starts but before the polices start installing. I was thinking to put it in-between when the network test connection starts and before the polices.

Also what is the behaviour after the video ends? Does it return to the installation screen or sit waiting to be replayed / close button clicked?

I have it that the video just end and there is a close button. We wanted to make it optional for the video so they can close it at any time. So if they don't want to see the video or if its a re-deploy and they already know what the company does/ they have seen the video already they can just close it out.

dan-snelson commented 1 month ago

Reviewed on 2024-06-07-052210; seems like a good use-case for @bartreardon's swiftDialog Multi Dialog Demo.

gabemarcelino commented 1 month ago

Hey Dan,

Sorry this should have been closed out since it is working now with Swiftdialog and multi dialog in the latest Swiftdialog, I was able to just run a policy called Youtube video during the process and have a script call out Dialog to be on top:

!/bin/zsh

dialogBinary="/usr/local/bin/dialog" "$dialogBinary" --ontop --movable --quitkey x --video youtubeid=XXXXXXX --autoplay --timer 92 --title "About One Medical" --videocaption "Please watch about One Medical while your mac is being setup" --button1text "Close Video" --big &