Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion assets/src/js/godam-gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ document.addEventListener( 'click', async function( e ) {
status: 'success',
};
} else {
const response = await fetch( `/wp-json/godam/v1/video-shortcode?id=${ newVideoId }` );
const response = await fetch(`/wp-json/godam/v1/cf7-form?id=${newVideoId}`);
data = await response.json();

if ( data.status === 'success' && data.html ) {
Expand Down
17 changes: 17 additions & 0 deletions inc/classes/wpforms/wpforms-field-godam-record-entry-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,23 @@ class="godam-video-link <?php echo ( empty( $value ) ? 'hidden' : '' ); ?>"
>
<div class="godam-video-name"><?php echo esc_html( $video_name ); ?></div>
</a>
<?php if ( ! empty( $value ) ) : ?>
<a
href="<?php echo esc_url( add_query_arg(
array(
'form_id' => absint( $form_id ),
'entry_id' => absint( $entry_id ),
'field_id' => absint( $field['id'] ),
),
site_url( '/godam-recorder/' )
) ); ?>"
target="_blank"
class="button godam-recorder-link"
>
<?php esc_html_e( 'Open Recorder', 'godam' ); ?>
</a>
<?php endif; ?>

<div class="godam-video-media-controls">
<button
type="button"
Expand Down
12 changes: 11 additions & 1 deletion inc/classes/wpforms/wpforms-field-godam-record-entry-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,23 @@
$transcoded_url = WPForms_Integration_Helper::get_transcoded_url( $form_id, $entry_id, $field_id );
$hls_transcoded_url = WPForms_Integration_Helper::get_hls_transcoded_url( $form_id, $entry_id, $field_id );
$transcoded_status = WPForms_Integration_Helper::get_transcoded_status( $form_id, $entry_id, $field_id );


$recorder_url = add_query_arg(
array(
'form_id' => $form_id,
'entry_id' => $entry_id,
'field_id' => $field_id,
),
site_url( '/godam-recorder/' )
);
?>

<div class="godam-video-preview">
<div class="godam-video-link-wrapper">
<span><?php esc_html_e( 'URL: ', 'godam' ); ?></span>
<a
href="<?php echo esc_url( $attachment_url ); ?>"
href="<?php echo esc_url( $recorder_url ); ?>"
target="_blank"
class="godam-video-link <?php echo ( empty( $value ) ? 'hidden' : '' ); ?>"
>
Expand Down