Forum Discussion
TheRealJMartinez
Jun 28, 2024Copper Contributor
My watch button doesn't work. What am I missing?
Hello all, I'm new to JSON/Sharepoint. I've pieced together a formatting that I like but I can't get the watch button to work. ChatGPT said something about a button element not able to be used to ope...
TheRealJMartinez
Jun 28, 2024Copper Contributor
nah, it can't be that simple!!! Thank you!
why doesn't the button element work? am i using it wrong?
steve_port
Jun 28, 2024Brass Contributor
TheRealJMartinez with the embed option you can get a video to play in a dialogue pop up
{
"elmType": "button",
"attributes": {
"class": "sp-row-button ms-borderColor-blue ms-bgColor-themePrimary ms-fontWeight-semibold ms-fontColor-white",
"title": "Watch"
},
"style": {
"position": "absolute",
"left": "8px",
"top": "320px",
"width": "264px",
"margin-left": "10px",
"display": "flex",
"align-items": "center",
"justify-content": "center",
"background-color": "#0078d4",
"border-radius": "4px",
"border-color": "#0082f0",
"padding": "10px"
},
"children": [
{
"elmType": "span",
"attributes": {
"class": "ms-fontIcon ms-Icon--Play"
},
"style": {
"font-size": "16px",
"margin-right": "8px"
}
},
{
"elmType": "span",
"txtContent": "Watch",
"style": {
"font-size": "16px",
"font-weight": "bold"
}
}
],
"customRowAction": {
"action": "embed",
"actionInput": {
"src": "[$Link]",
"height": "350",
"width": "700"
}
},
"txtContent": "Click here to open video :play_button:"
}
]
}
]