Connect with us

Milwaukee Bucks

Milwaukee Bucks players take kids shopping as part of ‘Shop with a Buck’ event

To view this video please enable JavaScript, and consider upgrading to a web browser that
supports HTML5 video

‘);
setTimeout(function(){
$(‘.mute-overlay’).on(‘click’, function(){
WVM.activePlayer.muted(false);
//console.log(“volumee ” + WVM.activePlayer.volume());
WVM.activePlayer.ima.getAdsManager().setVolume(WVM.activePlayer.volume());
$(‘.mute-overlay’).hide();
var currentTime = WVM.activePlayer.currentTime();
if(currentTime 0){
WVM.VIDEO_TOP = $(‘#media-container-‘ + videoId).offset().top;
WVM.VIDEO_HEIGHT = $(‘#html5-video-‘ + videoId).outerHeight();
WVM.CONTAINER_HEIGHT = $(‘#media-container-‘ + videoId).height();
console.log(“container height: ” + WVM.CONTAINER_HEIGHT);
$(window).on( “resize”, function() {
WVM.VIDEO_TOP = $(‘#media-container-‘ + videoId).offset().top;
WVM.VIDEO_HEIGHT = $(‘#html5-video-‘ + videoId).outerHeight();
WVM.CONTAINER_HEIGHT = $(‘#media-container-‘ + videoId).height();
console.log(“container height: ” + WVM.CONTAINER_HEIGHT);
});

console.log(“VIDEOTOP: ” + WVM.VIDEO_TOP);
console.log(“VIDEOHEIGHT: ” + WVM.VIDEO_HEIGHT);

$(window).on( “scroll”, function() {
if(!WVM.IS_FLOATING){
WVM.CONTAINER_HEIGHT = $(‘#media-container-‘ + videoId).height();
}

//var top = $(‘#media-container-‘ + videoId).offset().top;
var offset = WVM.VIDEO_TOP + (WVM.VIDEO_HEIGHT / 2);
var changed = false;
//console.log(“VIDEOTOP: ” + WVM.VIDEO_TOP);
//console.log(“VIDEOHEIGHT: ” + WVM.VIDEO_HEIGHT);
if($(window).scrollTop() > offset){
$(‘#media-placeholder-‘ + videoId).height(WVM.CONTAINER_HEIGHT);
$(‘#media-placeholder-‘ + videoId).css(‘display’, ‘block’);
if(!WVM.IS_FLOATING){
changed = true;
}
WVM.IS_FLOATING = true;
$(‘#media-container-‘ + videoId).addClass(‘floating-video’);
//set right
var sWidth = window.innerWidth || document.documentElement.clientWidth;
var sHeight = window.innerHeight || document.documentElement.clientHeight;
if(deviceName == ‘desktop’){
var leftPos2 = $(‘aside’).get(0).getBoundingClientRect().left;
var leftPos = $(‘aside’).offset().left ;
$(‘#media-container-‘ + videoId).css(‘left’, leftPos + “px”);
var newWidth = Math.floor(sWidth / 3.5);
$(‘#media-container-‘ + videoId).css(‘width’, newWidth + “px”);
}
else{
$(‘#media-container-‘ + videoId).css(‘width’, “100% !important”);
}

//floating-video
$(‘#media-container-‘ + videoId + ” ” + ‘.page-carousel-wrapper’).hide();
setTimeout(function(){
var hWrapper = $(‘.floating-video .hlsvideo-wrapper’).height();
var npWidth = $(‘.floating-video .now-playing-container’).height();
var ndWidth = $(‘.floating-video .next-dropdown-header’).height() + 20;
var scrollerHeight = sHeight – (hWrapper + npWidth + ndWidth);
$(‘#media-container-‘ + videoId + ” ” + ” .mobile-list-videos”).height(scrollerHeight);
}, 100);

}else{
if(WVM.IS_FLOATING){
changed = true;
}
WVM.IS_FLOATING = false;
$(‘#media-container-‘ + videoId).css(‘width’, “100%”);
$(‘#media-container-‘ + videoId).removeClass(‘floating-video’);
$(‘#media-placeholder-‘ + videoId).css(‘display’, ‘none’);

//$(‘#media-medial’).less().hasOwnProperty(‘folatate ro’);
//$(‘.cbs58link’).on(‘mousedown’, function(){
//});
}

if($(‘#next-dropdown-accordion-button-‘ + videoId).find(‘i’).hasClass(‘fa-chevron-up’)){
//console.log(“show it”);
if(deviceName == “desktop” && !$(‘#media-container-‘ + videoId).hasClass(‘floating-video’)){
$(‘#media-container-‘ + videoId + ” ” + ‘.page-carousel-wrapper’).show();
$(‘#media-container-‘ + videoId + ” ” + ‘.mobile-list-wrapper’).hide();
//console.log(“showing desktop”);
if(!WVM.player_state67592[‘CAROUSEL_INIT’]){
WVM.setupCarousel(videoId);
}

}else{
if(changed){
//default closed for mobile/floating player
$(‘#next-dropdown-accordion-button-‘ + videoId).find(‘i’).removeClass(‘fa-chevron-up’);
$(‘#next-dropdown-accordion-button-‘ + videoId).find(‘i’).addClass(‘fa-chevron-down’);
$(‘#media-container-‘ + videoId + ” ” + ‘.page-carousel-wrapper’).hide();
$(‘#media-container-‘ + videoId + ” ” + ‘.mobile-list-wrapper’).hide();
}else{
$(‘#media-container-‘ + videoId + ” ” + ‘.page-carousel-wrapper’).hide();
$(‘#media-container-‘ + videoId + ” ” + ‘.mobile-list-wrapper’).show();
}
}
}else{
$(‘#media-container-‘ + videoId + ” ” + ‘.page-carousel-wrapper’).hide();
$(‘#media-container-‘ + videoId + ” ” + ‘.mobile-list-wrapper’).hide();
}

} );

}
};

WVM.setupCarousel = function(fullVideoId){
// initialize Masonry after all images have loaded

WVM[‘player_state’ + fullVideoId][‘CAROUSEL_INIT’] = true;
if($(‘#page-carousel-‘ + fullVideoId).length > 0){
var container = document.querySelector(‘#page-carousel-‘ + fullVideoId);
imagesLoaded( container, function() {
var screenWidth = window.innerWidth || document.documentElement.clientWidth;
if(screenWidth > 850){
WVM.IS_DESKTOP = true;
$(‘#page-carousel-‘ + fullVideoId + ‘ .page-carousel-lg-slides’).css(‘display’, ‘block’);

WVM[‘player_settings’ + fullVideoId].slider = $(‘#page-carousel-‘ + fullVideoId).bxSlider({
maxSlides: 4,
minSlides: 4,
slideWidth: 305,
infiniteLoop: false,
hideControlOnEnd: true,
useCSS: true,
pager: false,
slideMargin: 15,
moveSlides: 1,
nextText: ‘‘,
prevText: ‘
});
}else{
WVM.IS_DESKTOP = false;
$(‘.page-carousel-wrapper’).css(‘display’, ‘block’);
}
});
}

};

WVM.setupToggleButton = function(fullVideoId){
if($(‘.nextplay-switch-‘ + fullVideoId).length > 0){
new DG.OnOffSwitchAuto({
cls:’.nextplay-switch-‘ + fullVideoId,
height: 24,
trackColorOn:’#F9F9F9′,
trackColorOff:’#222’,
textColorOn: ‘#222’,
textColorOff: ‘#222′,
textOn:’On’,
textOff:’Off’,
listener:function(name, checked){
var theVal = 1;
if(!checked){
theVal = 0;
}

$.ajax({
url: ‘/ajax/update_autoplay_video/’,
data: {
autoplay_on: theVal
},
type: ‘POST’,
dataType: ‘json’,
success: function(data)
{
WVM[‘player_settings’ + fullVideoId][‘autoplay’] = checked;
},
error : function(){
console.log(“Error loading video”);
}
});
}
});
}
};

WVM.setupAccordionButton = function(fullVideoId){
var deviceName = ‘desktop’;
$(‘#next-dropdown-accordion-button-‘ + fullVideoId).on(‘click’, function(){
if($(this).find(‘i’).hasClass(‘fa-chevron-up’)){
//hide
$(this).find(‘i’).removeClass(‘fa-chevron-up’);
$(this).find(‘i’).addClass(‘fa-chevron-down’);
if(deviceName == “desktop” && !$(‘#media-container-‘ + fullVideoId).hasClass(‘floating-video’)){
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.page-carousel-wrapper’).slideUp();
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.mobile-list-wrapper’).hide();

}else{
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.mobile-list-wrapper’).slideUp();
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.page-carousel-wrapper’).hide();
}
var currVideoId = WVM[‘player_state’ + fullVideoId][‘VIDEO_ID’];
var nextVideoId = WVM.getNextPlaylistIndex(currVideoId);
var myTitle = $(‘#videolink_’ + nextVideoId).data(‘noprefixtitle’);
$(‘#video-slider-nexttitle’ + fullVideoId).css(‘display’, ‘inline’);
$(‘#video-slider-nexttitle’ + fullVideoId).html(myTitle);
}else{
//expand
$(this).find(‘i’).addClass(‘fa-chevron-up’);
$(this).find(‘i’).removeClass(‘fa-chevron-down’);
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.mobile-list-wrapper’).css(‘display’, ‘block’);
if(deviceName == “desktop” && !$(‘#media-container-‘ + fullVideoId).hasClass(‘floating-video’)){
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.page-carousel-wrapper’).css(‘display’, ‘block’);
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.page-carousel-wrapper’).slideDown();
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.mobile-list-wrapper’).hide();
if(!WVM.player_state67592[‘CAROUSEL_INIT’]){
WVM.setupCarousel(fullVideoId);
}

}else{
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.mobile-list-wrapper’).slideDown();
$(‘#media-container-‘ + fullVideoId + ” ” + ‘.page-carousel-wrapper’).hide();

if(!$(‘#media-container-‘ + fullVideoId).hasClass(‘floating-video’)){
if(!WVM.player_state67592[‘CAROUSEL_INIT’]){
WVM.setupCarousel(fullVideoId);
}
}

}
$(‘#video-slider-nexttitle’ + fullVideoId).css(‘display’, ‘none’);
}

});
};
WVM.sendbeacon = function(action, nonInteraction, value, eventLabel) {
var eventCategory = ‘Video’;
if (window.ga) {
//console.log(“sending action: ” + action + ” val: ” + value);
ga(‘send’, ‘event’, {
‘eventCategory’: eventCategory,
‘eventAction’: action,
‘eventLabel’: eventLabel,
‘eventValue’: value,
‘nonInteraction’: nonInteraction
});
}
};

WVM.getNextPlaylistIndex = function(mediaId, returnArrayIndex){
var currId = null
for(var x =0; x = percent && __indexOf.call(percentsAlreadyTracked, percent) 0) {
percentsAlreadyTracked.push(percent);
}
}
}

});

player.on(‘ended’, function(){
//alert(“player id ” + player.id);
WVM.sendbeacon(“complete”, true, playerState.VIDEO_ID, playerState.VIDEO_URL);
//alert(“load new video”);
var currId = $(‘h5 a.selected’).first().data(‘mediaid’);
var newMediaId = WVM.getNextPlaylistIndex(currId);
var newIndex = WVM.getPlaylistArrayId(newMediaId);
if(playerSettings.autoplay_next && newMediaId){
load_video(newMediaId, true, playerState.ORIGINAL_ID, newIndex);
}

});

console.log(“ad tag url ” + WVM.adTagUrl);

player.on(‘adserror’, function(){
//$(‘#ima-ad-container’).remove();
WVM.lastAdRequest = new Date().getTime() / 1000;
console.log(“ads error”);
});

player.on(‘error’, function(event) {
if (player.error().code === 4) {
player.error(null); // clear out the old error
player.options().sources.shift(); // drop the highest precedence source
console.log(“now doing src”);
console.log(player.options().sources[0]);
player.src(player.options().sources[0]); // retry
return;
}
});

//player.textTracks()[0].mode = ‘disabled’;

WVM.activePlayer = player;
}

MILWAUKEE COUNTY (CBS 58) — Some members of the Milwaukee Bucks spent the afternoon with kids and took them shopping.

It was all part of ‘Shop With A Buck.’

The players went to the Kohl’s at Bayshore as part of the Bucks’ Season of Giving.

The event helps the kids get ready for the holiday season by shopping for gifts. 

Source Link

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in Milwaukee Bucks